Gentoo Archives: gentoo-user

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

Replies