[nycbug-talk] make -jN performance

Isaac Levy ike
Thu Jan 20 20:36:02 EST 2005

Wordup Bob,

On Jan 20, 2005, at 2:45 PM, Bob Ippolito wrote:

> make -j`sysctl -n hw.ncpu`

So from here, 'sysctl -n hw.ncpu' works fine on OSXServer(Jaguar even), 
but does not give the proper number of cpu's on the xeon boxes I tried 
it on- it returns '1' on a machine which otherwise is properly running 
as a dual-proc machine.

FreeBSD 4.10, dual XEON 2.6ghz, Tyan Motherboard

> I wouldn't recommend just guessing -j4.  Most people don't have 4 way 
> systems, there is no gain (as you two have proven empirically) if you 
> have less than 4 cpus, and in some cases people are using distcc.

I can dig the sentiment that slapping -j4 in there is silly, but if I'm 
doing things between boxes, and the sysctl bit is bugging out, (seems 
so at least), it really doesn't do me any harm does it?  (except in my 
testing it gives approx. 2% time increase on single procs, likely 
managing the process dance...)  What about -j2 even?


More information about the talk mailing list