1 |
On Sat, Sep 1, 2012 at 8:20 PM, Brian Harring <ferringb@×××××.com> wrote: |
2 |
> On Fri, Aug 31, 2012 at 11:12:44AM -0400, Alexis Ballier wrote: |
3 |
>> On Fri, 31 Aug 2012 15:45:21 +0100 |
4 |
>> Ciaran McCreesh <ciaran.mccreesh@××××××××××.com> wrote: |
5 |
>> |
6 |
>> > On Fri, 31 Aug 2012 10:21:15 +0200 |
7 |
>> > Ulrich Mueller <ulm@g.o> wrote: |
8 |
>> > > Coming back to this old topic [1]. Is there still consensus that we |
9 |
>> > > should have such an EJOBS variable? (It shouldn't be called JOBS |
10 |
>> > > because this name is too generic, see the old discussion.) Then we |
11 |
>> > > could add it to EAPI 5. |
12 |
>> > > |
13 |
>> > > Ulrich |
14 |
>> > > |
15 |
>> > > [1] |
16 |
>> > > <http://archives.gentoo.org/gentoo-dev/msg_750e33f68b16d971dff1f40dd9145e56.xml> |
17 |
>> > |
18 |
>> > If we're doing this, do we tell users to stop setting MAKEOPTS for |
19 |
>> > EAPIs 5 and greater? |
20 |
>> |
21 |
>> How can this work ? I cant think of any simple solution. |
22 |
>> |
23 |
>> > Do we change the name of MAKEOPTS for EAPIs 5 and |
24 |
>> > greater instead? Do we put fancy code in the package mangler to deal |
25 |
>> > with it? |
26 |
>> |
27 |
>> IMHO EAPI-5 compliant PMs should do MAKEOPTS="$MAKEOPTS -j$EJOBS" for |
28 |
>> every EAPI; using EJOBS from ebuilds/eclasses is allowed only in EAPI 5 |
29 |
>> and greater. |
30 |
>> This is retroactive but could be classified 'PM internals' so its fine |
31 |
>> imho. |
32 |
> |
33 |
> This approach is fine imo, although I'd *potentially* look at adding a |
34 |
> magic $PROC_COUNT var that is the # of cpu threads on the system; |
35 |
> either that or defaulting jobs to it. |
36 |
> |
37 |
> I rather dislike requiring users to go jam a 2/4/8 in there when it's |
38 |
> easy to compute. That said, it's minor. |
39 |
|
40 |
On this point, I use dynamic load-based job counting. I'd be using |
41 |
distcc, too, but I don't have the spare hardware for a second build |
42 |
box right now. |
43 |
|
44 |
For a single box, I target a load average of $PROC_COUNT, with a max |
45 |
jobs in the vicinity of 2x$PROC_COUNT, to prevent I/O hangs from |
46 |
causing job count explosions. (Where I/O hiccups aren't a concern, |
47 |
I've found leaving --jobs open-ended worked fine, but builds always |
48 |
eventually expand to consume available I/O as upstream things get |
49 |
larger) I find this works very well; emerge and make both manage to |
50 |
lurk near the optimum point of keeping the CPU busy without spending |
51 |
too much time in context switches. |
52 |
|
53 |
In a distcc context, I would most likely target a load average of |
54 |
$LOCAL_PROC_COUNT, with a max jobs of |
55 |
(2*$LOCAL_PROC_COUNT+$REMOTE_PROC_COUNT). |
56 |
|
57 |
If ebuilds are try to be more aware of parallel-build contexts, I |
58 |
think it's important they're not limited to static job counts. |
59 |
|
60 |
-- |
61 |
:wq |