Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25294 - get_number_of_jobs in eutils.eclass does not account for distcc hosts
Summary: get_number_of_jobs in eutils.eclass does not account for distcc hosts
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Lisa Seelye (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-25 19:06 UTC by John Steele Scott
Modified: 2011-10-30 22:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Steele Scott 2003-07-25 19:06:23 UTC
A few of the bigger ebuilds around the shop, e.g. Mozilla and XFree, use
get_number_of_jobs from eutils.eclass to modify MAKEOPTS so that the number of
jobs spawned by make is appropriate for the number of CPUs on the local machine.

For those of us who have a couple of extra machines which run as distcc servers,
this is a bit of a pain. For instance, here I run distcc on two Athlons to speed
up compile times on my G3 Powerbook. When I go to emerge a package like XFree,
get_number_of_jobs correctly detects that my Powerbook has only one CPU, and
reduces MAKEOPTS from -j5 to -j2. Thus make does not spawn enough jobs to use
all my available (distributed) CPU power.

Would it be feasible for get_number_of_jobs to account for the number of distcc
hosts when it calculates the number of jobs? Or would this only recreate the
problem which get_number_of_jobs tries to solve?

My simple solution would be to examine the list in /etc/distcc/hosts, try a test
compile on each of these machines, and increment jobs accordingly. However, if
one of those hosts becomes unavailable during the build, then I fear that the
job number will be incorrect, possibly causing the build to fail.

Can anyone comment on this? Is it worth coding up something like I have
described, to see how it goes?

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2003-07-25 22:22:54 UTC
i propose you just set up your MAKEOPTS in make.conf the way you should and 
forget about trying to make portage sufficiently smart ... but thats just me :) 
Comment 2 Lisa Seelye (RETIRED) gentoo-dev 2003-07-26 07:54:58 UTC
From asking around it seems that this function is supposed to ensure that the build will complete.

The best solution would be to disable parallel makes when they fail (such in the case of Xfree and Mozilla) instead of trying to guess what -j would be the "best."

I'll ask around some more to find the true intention of the function, but I'm hesitant to change it right now, without more info.
Comment 3 John Steele Scott 2003-07-26 16:41:06 UTC
That's cool, it was just a thought . . . you know, when you're compiling a big package on a 
slow machine, thoughts about how to improve the compile time seem really important . . . 
but once the package is compiled, compile time seems less important and stability moreso. 
 
I guess the real fix would be to fix the build systems for the packages which fail with high job 
numbers, but I suspect that'd be rather more difficult. 
 
Bug 13565 contains more discussion about this function, and a suggestion that those of us 
who don't like it can disable it via the portage overlay in /usr/local/portage. 
Comment 4 Lisa Seelye (RETIRED) gentoo-dev 2003-07-26 17:32:12 UTC
Right.

I think the only packages that have problems with parallel makes use this function.  I don't really see any reason or need to do anything with this function at this time.