Subject: Re: build.sh safe with -j4 ?
To: None <port-i386@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: port-i386
Date: 11/21/2007 18:22:40
On Wed, Nov 21, 2007 at 12:04:28PM -0500, George Georgalis wrote:
> On Wed, Nov 21, 2007 at 01:06:05PM +0000, Matthias Scheler wrote:
> >On Wed, Nov 21, 2007 at 08:31:35AM +0200, Jukka Marin wrote:
> >> I'm running the following on a quad core i386 cpu, NetBSD 4.0 RC4:
> >> 
> >> ./build.sh -j 4 -O /test/tmp/obj -T /test/tmp/tools -R /test/nb4/release -D \
> >> /test/tmp/dst -X ../xsrc -r -x tools release iso-image
> >
> >"-j 4" is not enough for a quad core CPU, you need "-j 8".
> 
> The OP didn't say he had dual quads... I use
> 
> -j$(sysctl -n hw.ncpu)
> 
> is that correct or should I double it?

Use at least one job more than CPUs. Twice is a good setting to avoid
too much IO stalling.

Joerg