[nycbug-talk] Re: talk Digest, Vol 14, Issue 9
Pete Wright
pete
Thu Jan 13 19:45:07 EST 2005
>>
>> # make -j5 buildworld KERNCONF=MY_KERNEL
>>
>> this will launch 5 make jobs, which will speed up some of the make
>> tasks.
>
> Typically it's recommended to use -jN where N is the number of
> processors you actually have. For values of N greater than the number
> of CPUs you have, it should actually go slower... I would think that
> -j5 is slower than -j4 on a dual CPU system (though -j3 or -j4 might be
> a little faster than -j2 for some kinds of source, -j2 is always faster
> than -j1 on a dual processor system).
>
> -bob
>
Just to prove that I'm not pulling this outta my a*s. From the handbook
(granted it's from make buildworld...altho I've found this to work fine on
kernels for a long time now):
"It is now possible to specify a -j option to make which will cause it to
spawn several simultaneous processes. This is most useful on multi-CPU
machines. However, since much of the compiling process is IO bound rather
than CPU bound it is also useful on single CPU machines.
On a typical single-CPU machine you would run:
# make -j4 buildworld
make(1) will then have up to 4 processes running at any one time.
Empirical evidence posted to the mailing lists shows this generally gives
the best performance benefit.
If you have a multi-CPU machine and you are using an SMP configured kernel
try values between 6 and 10 and see how they speed things up.
Be aware that this is still somewhat experimental, and commits to the
source tree may occasionally break this feature. If the world fails to
compile using this parameter try again without it before you report any
problems."
-p
--
~~oO00Oo~~
Peter Wright
pete at nomadlogic.org
www.nomadlogic.org/~pete
917.415.9866
More information about the talk
mailing list