Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Simultaneously emerging multiple packages with same dependencies
Date: Thu, 27 Jan 2011 22:04:03
Message-Id: 201101272302.31293.joost@antarean.org
In Reply to: Re: [gentoo-user] Re: Simultaneously emerging multiple packages with same dependencies by YoYo Siska
1 On Thursday 27 January 2011 22:06:30 YoYo Siska wrote:
2 > On Thu, Jan 27, 2011 at 08:18:34PM +0100, J. Roeleveld wrote:
3 > > On Thursday 27 January 2011 19:56:23 Allan Gottlieb wrote:
4 > > > On Thu, Jan 27 2011, Neil Bothwick wrote:
5 > > > > On Thu, 27 Jan 2011 17:09:27 +0200, Nikos Chantziaras wrote:
6 > > > >> > So on a 20 package world update, only 19 are faster while the 20th
7 > > > >> > runs at the same speed? Where's the loss there? Even if the last
8 > > > >> > were slower, it would be worth it.
9 > > > >>
10 > > > >> Given the amount of time unpack/configure/install of most packages
11 > > > >> needs (very short), my observation is that it would not be worth it.
12 > > > >
13 > > > > Even if that were true, how much time would you have to save to
14 > > > > justify adding -j 2 to EMERGE_DEFAULTS in make.conf?
15 > > > >
16 > > > > But it's not true, large packages spend a lot of time on these phases
17 > > > > of the install.
18 > > >
19 > > > OK I'm convinced since I know that those phases do take noticeable
20 > > > time.
21 > > >
22 > > > I have a "4" processor i7 model 620 (2 cores, doubled for
23 > > > hyperthreading) and have set MAKEOPTS="-j5".
24 > > > If I add -jobs=2 to EMERGE_DEFAULT_OPTS, should I lower
25 > > > MAKEOPTS to 3 (to 4)?
26 > > >
27 > > > thanks,
28 > > > allan
29 > >
30 > > You could, as if you leave it at -j5, you can end up with 2 * 5 = 10
31 > > processed, eg: similar as if running with MAKEOPTS="-j10"
32 > >
33 > > I think the option that YoYo came with is a good compromise:
34 > > # MAKEOPTS="-j -l5" emerge -j --load-average=5
35 > >
36 > > Next time I am doing a big upgrade, I'm going to test that to see how it
37 > > behaves.
38 >
39 > I was just building the whole system for my notebook in a chroot on my
40 > desktop machine ( I use FEATURES=buildpkg to build binary packages in
41 > the chroot on a fast desktop machine and then upgrade the notebook with
42 > the binary packages) and I used exactly that (-j -l5 for bot make and
43 > emerge). Can't say if it really is better or not ;) but most of the time
44 > all four cores were busy, though sometimes I saw even 6 or 7 gcc-s
45 > simultaneously in top ;)
46 > emerge was running 3 to 4 jobs most of the time, sometimes dropping to 1
47 > and once I saw it emerging about 10 parallel packages ;) (mostly small
48 > things, which I guess were doing a lot of
49 > unpacking/configuring/installing but almost nothing of compiling ;)
50 >
51 >
52 > btw, just now I got this error from dev-lang/v8:
53 >
54 > SCons error: option -j: invalid integer value: '-l4'
55 >
56 > seems scons honors MAKEOPTS, but doesn't understand the "loadaverage"
57 > version (-j -l4)
58
59 You might be able to avoid this by using the "long" version in the MAKEOPTS
60 for "-l"?
61
62 Eg:
63 MAKEOPTS="-j --load-average=5" emerge -j --load-average=5
64
65 --
66 Joost