1 |
On 9/11/2012 9:54 AM, Ian Stakenvicius wrote: |
2 |
> -----BEGIN PGP SIGNED MESSAGE----- |
3 |
> Hash: SHA256 |
4 |
> |
5 |
> On 11/09/12 12:43 PM, Zac Medico wrote: |
6 |
>> On 09/11/2012 09:36 AM, vivo75@×××××.com wrote: |
7 |
>>> Dunno where to place this request, but if we go for something |
8 |
>>> like EJOBS could we also make it phase specific? So compile, |
9 |
>>> install and test could have a different number of jobs running. |
10 |
>>> Possibly three different variables that override a predefined |
11 |
>>> EJOBS. |
12 |
>> |
13 |
>> Per-phase sounds a little to fine-grained. Instead, I'd suggest to |
14 |
>> add an ELOADAVG variable that's analogous to make's --load-average |
15 |
>> option. That should be enough to compensate for any differences |
16 |
>> between phases. |
17 |
> |
18 |
> I personally wonder about why this would be necessary from the |
19 |
> perspective of the user; if the user's system at emerge time can |
20 |
> handle X concurrent processes per emerge-job , i don't see why it |
21 |
> would matter what phase these jobs would be launched from. |
22 |
> |
23 |
> At the ebuild level, certainly, but that's one of the reasons for |
24 |
> EJOBS in the first place, so that it can be overridden consistently |
25 |
> within a phase, if necessary for the ebuild (regardless of build |
26 |
> system type), right? |
27 |
|
28 |
I would hope so. There are definitely real-world reasons to want to |
29 |
restrict jobs -- usually to just one -- in a particular phase... several |
30 |
ebuilds, notably several in @system, do this already by injecting -j1 |
31 |
somewhere. |
32 |
|
33 |
To say it's all about performance seems to be forgetting a major reason |
34 |
somebody might want to do this as a user or an ebuild author. |
35 |
|
36 |
Hmm... |
37 |
|
38 |
I should preface this by saying that it really pains me to say this, |
39 |
because now this just starts to seem so fucking complicated -- but now |
40 |
that I think about it, this really seems to highlight a kind of semantic |
41 |
discrepancy that this thread has mostly dusted under the rug. |
42 |
|
43 |
There are really TWO things we seem to care about -- one is some kind of |
44 |
global build-parallelism frob-set, and the other is the ability to turn |
45 |
off all parallelism for certain parts of an ebuild and those are |
46 |
actually kind-of orthogonal. |
47 |
|
48 |
In other words, imagine if we had some kind of "global parallellism |
49 |
arbiter" thingy that looked at EJOBS or ELOADAVG or maybe some other |
50 |
things we haven't thought of yet, and decided things like: |
51 |
|
52 |
o should portage start a new parallel emerge process? |
53 |
o What is the appropriate "MAKEOPTS" for the "emake" |
54 |
that foo-1.0.ebuild just issued? |
55 |
|
56 |
or even, one could imagine, such things as: |
57 |
|
58 |
o should portage decide that parallelism has gotten out of control |
59 |
somehow and suspend or kill a running ebuild for subsequent |
60 |
resuming or restarting? |
61 |
|
62 |
o should portage re-nice some of its processes? |
63 |
|
64 |
Note that, effectively, we have this already, and it's called "portage". |
65 |
But one could certainly make a case for modularizing it better, since, |
66 |
in truth, we are talking about a very common, very abstract problem here |
67 |
which portage shares with any number of batch-build systems. |
68 |
|
69 |
Such an engine could very well do exactly the right thing if it were |
70 |
faced with a constraint that a certain part of a certain build needed to |
71 |
proceed without parallelism due to limitations coming from the build. |
72 |
|
73 |
Also, there are very large parts of most builds -- configure comes to |
74 |
mind -- that don't parallelize even if, perhaps, they should. In such |
75 |
cases, a really smart global parallelism arbiter could easily respond by |
76 |
spawning more jobs from other builds. |
77 |
|
78 |
Not sure what I'm suggesting we do about it, exactly, but just pointing |
79 |
out that maybe a completely "correct" solution requires a much more |
80 |
elaborate implementation than just a bunch of syntactic sugar around |
81 |
what we currently call MAKEOPTS. Whether or not Gentoo wants to take |
82 |
that all on, right now, as part of the next EAPI, is certainly debatable |
83 |
-- in fact, I'm inclined to say maybe it's not the best idea. |
84 |
|
85 |
Perhaps we should really be asking: is the status-quo really so |
86 |
problematic/inelegant that it needs fixing? -- before we decide how best |
87 |
to fix it. |
88 |
|
89 |
-gmt |