First build-infra push to jdk8 -- try out the new build system!

Kelly O'Hair kelly.ohair at oracle.com
Mon May 14 16:50:22 UTC 2012


On May 14, 2012, at 2:49 AM, Magnus Ihse Bursie wrote:

> On 2012-04-13 16:46, Jonathan Gibbons wrote:
>> On 04/13/2012 02:07 AM, Magnus Ihse Bursie wrote:
>>> 
>>> As for the --with-num-cores, yes, it is a configure time option. The underlying assumption is that your hardware doesn't really change, and if your build system is too weak, it will be too weak at configure time and at all make times. With that said, it is always possible (and not very hard) to re-run configure if you need to tweak such a parameter.
>>> 
>> 
>> As a developer, my machoine may not change, but my expectations may.   Sometimes I want a build to run in the background while I pursue other activities, whether tetris, browsing, or working on the next bug fix.   Other times, I need the build ASAP.  So while your underlying assumption is good for batch build systems, it may not always be true on developer machines.
> 
> We have now implemented the possibitlity to override the default parallelism using the standard make -j option. In short, if you just type "make" you will be using the number of cores detected by (or explicitely configured in) configure, which will make the default build be as fast as possible.

The only issue I have seen with this involves systems with lots of processors, but not enough disk, or swap, or ram capacity to
back up that many C++ compilations at the same time.
Historically this 'what's the best make -j N' setting has been difficult with all the different systems out there.
I have seen builds go faster with -j 16 than with -j 32 on a 64 processor machine, simply because of the disk contention.
To make matters more complicated, the systems are getting faster all around, so many of my measurements of the past
don't make much sense.

So I would say, use the default until it becomes too painful to use it (the system starts to lockup), then back it down
to a comfortable setting.  In other words, you may need to play with it on some systems.

-kto

> 
> If you want to make a slower build but save some CPU power for other processes, you can run e.g. "make -j 2". This will force the makefiles to only run 2 parallel processes, or even "make -j 1" which will disable parallelism.
> 
> If you want to have it the other way round, namely having slow builds default and override with fast if you're impatient, you should call configure with --with-num-cores=2, making 2 the default. If you want to run with more cores, run "make -j 8" or just "make -j"; the latter will let make determine the maximum number of parallel jobs.
> 
> This features is currently implemented in the build-infra forest, but it is scheduled for merging into the build forest at the next push. (Webrev coming up soon...)
> 
> /Magnus
> 




More information about the build-dev mailing list