Make buildworld

Chuck Robey chuckr at
Mon Jun 9 02:11:03 UTC 2008

Hash: SHA1

Brian wrote:
> Jos Chrispijn wrote:
>> Can someone tell me the difference between 'make -j2 buildworld' and
>> 'make -j4 buildworld' ?
>> Thanks,
>> Jos
>> _______________________________________________
>> freebsd-questions at mailing list
>> To unsubscribe, send any mail to
>> "freebsd-questions-unsubscribe at"
> fyi, the below is from /usr/src/UPDATING:
>        General Notes
>        -------------
>        Avoid using make -j when upgrading.  From time to time in the
>        past there have been problems using -j with buildworld and/or
>        installworld.  This is especially true when upgrading between
>        "distant" versions (eg one that cross a major release boundary
>        or several minor releases, or when several months have passed
>        on the -current branch).

I really don't think that's a fault of make(1), it's a fault of the Makefiles,
which have to be written very carefully so that having multiple parallel
processes going might screw up building.  Yes, it has done that in the past, but
it's an occaisonal thing, not a regular thing, because there's a good number of
folks who build there kernels with something like -j4.  I often do.  One just
has to be really awake when you hit a problem, or when reporting a build
error... rebuild without the -jN.

I did some testing, at least for me, I get the most improvements when the number
of cores or processors equals the -j number.  You can make it higher, even
double it, withoout hurting things, but 95% of the improvements come from
matching the number of processes to the number of available CPUs (and that' by
my own testing, not theory).

Still, if you aren't willing to do your won troubleshooting, best to avoid using
- -j anything.  It's very  easy to screw up.
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla -


More information about the freebsd-questions mailing list