make -jn not necessarily helpful
Justin C. Sherrill
justin at shiningsilence.com
Mon Mar 13 20:38:22 PST 2006
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
Looking at the result: 1 hour 15 minutes 40-something seconds, every time,
no matter the -j setting. This is on a 1.6G Celeron, with a PATA drive
and ~350M ram. Would I see a difference if the CPU was faster and the
drive was slower?
If someone had some free CPU cycles to waste and could time a buildworld
as above, I'd be interested in the results. I'd like to see under what
conditions the -j flag becomes useful or not useful, or if perhaps I'm
just missing something.
More information about the Users
mailing list