Subject: Re: i386 MP performance ( and generic almost same)
To: NetBSD Current Users <>
From: Adam Hamsik <>
List: current-users
Date: 11/11/2007 23:17:36
On Nov,Sunday 11 2007, at 3:58 PM, Michael Lorenz wrote:

> Hash: SHA1
> Hello,
> On Nov 11, 2007, at 09:47, Paul Goyette wrote:
>> On Sun, 11 Nov 2007, Steven M. Bellovin wrote:
>>> Compilation is indeed CPU-bound; however, unless you've taken  
>>> special
>>> steps, it's a single process at a time.  What you need to do is  
>>> specify
>>> '-j 2' when invoking, to run two processes simultaneously;
>>> see /usr/src/BUILDING for details.
>> In my experience, '-j 2' won't be enough to provide definitive  
>> results, since that seems to improve performance on uni-processor  
>> systems, too (though not by as much).  On my AMD X2 systems I run  
>> builds with it set to '-j 4' and that seems to give the most benefit.
>> But even on uni-processors '-j 2' will improve things since it  
>> gives a chance for a second job to run on the (only) CPU while the  
>> other one is waiting for I/O completion.
> Same on my dual G4 - with -j2 both CPUs are running at about 60%  
> average, with -j4 both run at 100%.
> Especially with sources over nfs the rule of thumb seems to be -j  
> (2*num_cpus) to avoid too much waiting.

I found that for P4 server I can set -j to 3, 4 and get better  
compilation times than with 2 with HT disabled.