Thread: Multicore builds on MSVC
Hi! I have a simple one-line patch to enable the use of multiple CPUs or cores when building with MSVC. It is only inside the C compiler itself, but it makes about a 30-35% reduction in compile time on a fairly CPU-limited dual-CPU VM. It would probably do a lot more on for example a quadcore. It pushes the CPU to 100% when building the larger projects like postgres.exe and psql.exe, but obviously stays a lot lower for building all the small single-file projects, since it's only the C compiler that uses it. I can measure no performance decrease on single-core CPUs. Probably because the switch makes the compiler figure out how many CPUs that are available... Since we only support one compiler (Visual Studio 2005) for this, I see the risk of this as very low. The only downside is if you use this on a development machine, it will use up all your CPU whereas previously it used only one core. I haven't even seen normal operations on the machine slow down thouhg... I'm going to apply this for HEAD. I'm considering backpatching as well, to speed up all build machines. Comments on that? -- Magnus HaganderSelf: http://www.hagander.net/Work: http://www.redpill-linpro.com/
On Fri, Jul 24, 2009 at 8:07 PM, Magnus Hagander<magnus@hagander.net> wrote: > I'm going to apply this for HEAD. I'm considering backpatching as > well, to speed up all build machines. Comments on that? Let's see how it goes in the BF for HEAD, and then backpatch if it looks good. I'm keen to get the potential speedup on 8.3 & 8.4. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
On Fri, Jul 24, 2009 at 21:33, Dave Page<dpage@pgadmin.org> wrote: > On Fri, Jul 24, 2009 at 8:07 PM, Magnus Hagander<magnus@hagander.net> wrote: > >> I'm going to apply this for HEAD. I'm considering backpatching as >> well, to speed up all build machines. Comments on that? > > Let's see how it goes in the BF for HEAD, and then backpatch if it > looks good. I'm keen to get the potential speedup on 8.3 & 8.4. Applied to HEAD. -- Magnus HaganderSelf: http://www.hagander.net/Work: http://www.redpill-linpro.com/
On Mon, Jul 27, 2009 at 09:11, Magnus Hagander<magnus@hagander.net> wrote: > On Fri, Jul 24, 2009 at 21:33, Dave Page<dpage@pgadmin.org> wrote: >> On Fri, Jul 24, 2009 at 8:07 PM, Magnus Hagander<magnus@hagander.net> wrote: >> >>> I'm going to apply this for HEAD. I'm considering backpatching as >>> well, to speed up all build machines. Comments on that? >> >> Let's see how it goes in the BF for HEAD, and then backpatch if it >> looks good. I'm keen to get the potential speedup on 8.3 & 8.4. > > Applied to HEAD. Since all buildfarm boxes and my test boxes have handled this without problems, I've backpatched it to 8.4, 8.3 and 8.2. -- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/