make -j$n buildworld : use of -j investigated

Rob spamrefuse at yahoo.com
Sat Nov 27 16:40:35 PST 2004


Frank Behrens wrote:
> I read this thread with interest and saw the question, how the system 
> wil behave with hyperthreading. Should I not benchmark my system? 
> here you have the results. The interpretation is left to the experts.
> 
> IMHO HT is not as useless as expected. :-)
> 
> I did not switch off SMP with sysctl, but used an extra UP Kernel to 
> allow some optimizations during compile. But I don't know if there 
> are any..
> 
> Hardware is
> CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2798.66-MHz 686-class CPU) 
> Origin = "GenuineIntel"  Id = 0xf33  Stepping = 3
> Hyperthreading: 2 logical CPUs
> real memory  = 1072889856 (1023 MB)
> avail memory = 1040453632 (992 MB)

According to my formula:

   time(minutes) = 1e5 / ( speed(MHz) * nproc )

and taking nproc = 1, this results in

   time = 1e5 / 2798.66 = 36 minutes

Quite accurate for your system as well. At least this formula gives a
resonable estimate about the compile time.

Apparently HT does not help much, since with SMP kernel, times do not
get any close to 36/2 = 18 minutes. However, there is a slight improvement
from -j1 to -j2 with SMP.

I myself have not yet tested HT systems.

Rob.




More information about the freebsd-stable mailing list