Subject: Re: i386 MP performance (generic.mp and generic almost same)
To: None <paul@whooppee.com>
From: Michael Lorenz <macallan@netbsd.org>
List: current-users
Date: 11/11/2007 09:58:59
-----BEGIN PGP SIGNED MESSAGE-----
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 build.sh, 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.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBRzcYs8pnzkX8Yg2nAQJntAf/QaQ3EOHeb0WRBKCvbc4T59zGaplv+pO3
XMJhgyc8FSM7fzh/ZvpgfYPghS2jZ1ULgtex1+I2RMPEr/p2bDYVzmOpKXXKRAWZ
/8ccAtiEs22bfjwmIBBrOcE5FObYWxCry4pg8Nyd3xXIDrsYL5xJDD0HDpl6S4Uz
HkhRyNe0ODAQSHprfwelgvqE9+4P1VO1PTF45Zo2tXPs0TI8FEFkCeRZzG9C4C3A
ynpUNHzhYzUPdfmIrGQzAQrs4VrCfh/MzgRmlC3qhmtbl4Hc6FCWAFE14FXqL7ut
1kOrvUVLnOPXZcheQA+hOx7R6p2UQlVLHPZ3CfpRv/c7jq3D/CwEKA==
=eRCh
-----END PGP SIGNATURE-----