make -jn not necessarily helpful

Freddie Cash fcash at ocis.net
Tue Mar 14 09:32:32 PST 2006


On Mon, March 13, 2006 8:52 pm, Justin C. Sherrill wrote:
> Out of curiousity, I thought I'd try running make buildworld with the
> -j option in a few different configurations to see what difference
> it made. I know it's supposed to speed up the process by a certain
> amount because of the parallel processing, but there's no direct
> quantifier.

> I put together a shell script that had this several times over

> make clean
> echo `date` >> /home/justin/benchmark.txt
> echo 'make -j2 buildworld' >> /home/justin/benchmark.txt
> make -j2 buildworld
> echo `date` >> /home/justin/benchmark.txt
> echo " " >> /home/justin/benchmark.txt

> I did this with no -j, -j1, -j2, and -j3

Try moving the make clean to the end, and rebooting between runs. 
That will eliminate any caching or disk buffering that may be
happening.

I haven't timed the buildworld runs on my systems in a long time, but
the last time I did, -j2 was faster than -j1 on a UP system.  All
higher -j settings were slower.  And on a dual-Opteron sytem, -j4 and
-j6 alternated between being the fastest.


----
Freddie Cash
fcash at xxxxxxxx






More information about the Users mailing list