Subject: Re: -j njobs
To: Daniel Eggert <danieleggert@mac.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 04/20/2003 17:07:12
On Sun, Apr 20, 2003 at 04:40:27PM +0200, Daniel Eggert wrote:
> 
> On søndag, apr 20, 2003, at 15:23 Europe/Copenhagen, Manuel Bouyer 
> wrote:
> 
> >On Sat, Apr 19, 2003 at 02:55:38AM +0200, Mipam wrote:
> >>Hi,
> >>
> >>Any reason not to use -j 6 for example at the execution of build.sh?
> >>Anything to be carefull with before doing so?
> >
> >In the 1.6 branch I'm not sure it'll work properly.
> >In current it should work. But there are something bugs in makefiles
> >(missing .WAIT) which makes the build fail with -j > 1
> >
> 
> As far as i know, it only makes sense (i.e. help speed) on 
> multi-processor machines. n = number of processors.

No, even on UP machines it helps a bit: you may have a process of
the build is CPU bound, while another one is I/O bound. This happens
a lot while compiling: there is a phase where the toolchain is mostly
doing I/O (especially at startup, it reads the file, includes, etc - and
while linking) and another one where it's mostly using CPU (cc1, while
doing optimisations).
And for MP machine you'd better use n > number of processors for the
same reason (n = 4 works fine for dual-CPU machines).

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--