FreeBSD and "make -j# buildworld" usability

Garance A Drosihn drosih at rpi.edu
Fri Oct 13 17:42:50 UTC 2006


At 4:31 PM +0200 10/13/06, Buki wrote:
>Hi,
>
>I searched the archives and web a little but found many different
>opinions on stability/usability of using make -j# with buildworld
>(and buildkernel).
>
>So I am asking if it is a good idea to use make -j on production
>boxes.

It depends on the target.  There are no bugs in 'make -j' per se, but
a makefile target has to pay attention to some extra details if that
specific target is going to work reliably when using '-j'.

You are asking about two different targets.  It should be safe to use
-j on 'make buildworld', and in fact I do that all the time.  Most of
my systems are dual-CPU or dual-core, and -j makes the buildworld go
significantly faster.  *Occasionally* that does not work (particularly
if you are following the freebsd-current branch), but any problems in
that target are fixed as soon as they are noticed.

In the past it has not been safe to use -j on 'make buildkernel', so I
never do that.  You probably wouldn't gain all that much time by using
-j on 'make buildkernel' -- or at least not as much time as you'll lose
the first time it does not work right.  So I'm sure you see plenty of
people say "DON'T DO THAT!!" when it comes to -j and 'make buildkernel'.

Some work is now being done so that -j can be reliably used on
'make buildkernel', but I don't think that has been completed yet.  For
now, my own opinion is that you're not going to save enough time with
-j on buildkernel to justify the amount of time you'll lose if it does
not work.  That is my answer for today, but I expect -j for buildkernel
will be more reliable as time goes on.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu


More information about the freebsd-stable mailing list