FreeBSD and "make -j# buildworld" usability

Kent Stewart kstewart at owt.com
Fri Oct 13 20:48:33 UTC 2006


On Friday 13 October 2006 07:31, 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.
>

I tested buildworlds with different values for -j. On single processors, 
using a script that basically looked like

time make -j? ...

yielded fastest builds when I didn't specify a value for -j. On dual 
cpu's a value around -j8 yielded the fastest build. I am not interested 
in system and user time. To me the fastest build is the one that 
produced the smallest wallclock time or elapsed time, which is the 3rd 
field in the output of time. The fastest build also yielded the highest 
cpu utilization, which is the 4th field.

I figure specifying a value for -j on single cpu system is simply 
thrashing the cpu by forcing it to save the environment to work on a 
different section of the build.

I also found that mounting /usr/src and /usr/obj on different 
controller/HDs from the system reduced the build time. I was using 
ata-133 HDs and a good scsi would be change the results. It is too easy 
to test in your environment to see what produces the fastest 
buildworld.

I am going to have to upgrade at some point and an AMD X2 should be 
interesting.

Kent

-- 
Kent Stewart
Richland, WA

http://www.soyandina.com/ "I am Andean project".
http://users.owt.com/kstewart/index.html


More information about the freebsd-stable mailing list