Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gcc fails and then succeeds - definitely a problem?
Date: Thu, 23 Feb 2012 22:06:29
Message-Id: CA+czFiDvHFOW+FUXO9D-5XTu-NsnuYB-usn1w9QYoEzg-As06g@mail.gmail.com
In Reply to: Re: [gentoo-user] gcc fails and then succeeds - definitely a problem? by Grant
1 On Thu, Feb 23, 2012 at 4:00 PM, Grant <emailgrant@×××××.com> wrote:
2 >>> > Parallel builds are not deterministic so if the Makefile allows a race
3 >>> > condition to develop it's pot luck whether you'll be hit with it or
4 >>> > not
5 >>>
6 >>> I got sick of stuff like that so I run MAKEOPTS="-j1" on all of my
7 >>> systems.
8 >>
9 >> If it were a frequent occurrence, there may be some benefit in that. But
10 >> using only one of the CPUs 8 cores is such a waste when this sort of
11 >> thing happens only every few weeks. Usually trying again works, rarely
12 >> does using -j1 make a difference and when it does a bug report ensures
13 >> that it won't be an issue in future.
14 >
15 > OK you've inspired me to give it another try.  So if I find a package
16 > that doesn't build with -jn where n > 1 but does build with -j1 I
17 > should file a bug?
18
19 Pretty much. It can get more specific than that, but that much is
20 already a help.
21
22 Here's the relevant portions of my MAKEOPTS and EMERGE_DEFAULT_OPTS
23 which should speed things up for you about as much as possible.
24
25 MAKEOPTS="--jobs --load $n" # Where $n is num_CPUs * 1.25
26 EMERGE_DEFAULT_OPTS="--jobs --load-average=$m" # Where $m is num_CPUs * 1.5
27
28 With the "--jobs" parameters, I haven't needed to set $n or $m to
29 num_CPUS*2 to try to keep the load average up.
30
31 Here's my MAKEOPTS and EMERGE_DEFAULT_OPTS verbatim, for an eight-core machine:
32
33 MAKEOPTS="--jobs --load 10"
34 EMERGE_DEFAULT_OPTS="--jobs --load-average=12 --verbose --tree
35 --with-bdeps=y --keep-going"
36
37 If you want to keep things simple, just go with num_CPUs=n for both $m and $n.
38
39 --
40 :wq