suggest 'make -j2' for SMP machines?

Mohan skydyr at nerdshack.com
Mon Jun 4 20:52:47 PDT 2007


On Mon, 04 Jun 2007 23:16:58 -0400
George Boudreau <georgeb at linuxfromscratch.org> wrote:

> Deskin Miller wrote:
> > On 6/4/07, Miguel Bazdresch <lfs-01 at thewizardstower.org> wrote:
> >> Deskin Miller wrote:
> >>> [ should the book say anything about 'make -j X' on multi-core
> >>> systems? ]
> >> ['make -j X' where X is number of cores is more or less optimal...]
> >>
>    There are issues when running make with other than -j1. Some
> package builds will fail when make tries a parallel build. You can
> check out jhalfs' optimize section which has an incomplete black list
> of packages with MAKEFLAG issues.
> >> As far as mentioning it in the book... I'm not enthusiastic, since
> >> it's basic knowledge of how your computer works... OTOH we already
> >> say some pretty basic things, and the proliferation of multicore
> >> CPUs might warrant a mention of make -j.
> > 
>    This also applies to the 'older' Hyper-Threading Intel products. I 
> saw  a noticeable reduction in compile times when I went to -j2.

I've actually seen some improvement on compile times running Athlons
and such as well with -j2... I suspect it fills time the compiler spends
waiting for this or that read, or write, or something.  There are
certainly a lot of packages I've run into that have trouble with
parallelization, though.  Not that it's much of a problem to just start
the compile again without -j2.

-- 
Mohan
«C'est le temps que tu as perdu pour ta rose,
       qui fait ta rose si importante»
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070604/3970a062/attachment.sig>


More information about the lfs-dev mailing list