On 5/12/23 09:16, Peter Humphrey wrote:
On Friday, 12 May 2023 11:09:37 BST Arve Barsnes wrote:
On Fri, 12 May 2023 at 10:34, Peter Humphrey <pe...@prh.myzen.co.uk>
wrote:

I have said several times that portage is ignoring that setting. I have it
at 40, yet portage kicks off more packages at 72, and continues doing so
for extended periods - at least 15 minutes.
But are you sure that it is actually ignored? It was said in an
earlier message from Mark that the value was related to number of
cores, where your 24 cores at 100% average load would translate to a
value of --load-average 24.0. That would put your value of 40 at 166%
average load? What load are you actually trying to limit it to? If you
want 40% load, that should apparently be --load-average 9.6.
I'm reading man make.conf, which makes quite clear that --load-average limits
the number of portage packages to be emerged, so as to avoid excess load.
Simple.

Either --load-average is designed to do as the man page says, but it doesn't
work and should be fixed, or it should be removed, being useless and
misleading. We can't have an option that limits load, but can be ignored at
portage's whim.

I haven't had a reply to my question in the bug report yesterday: "Why is
--load-average=40 being ignored?" but it is perhaps early days yet.

A possibility has just occurred to me: it seems to me that the use of a
floating-point number for load average is a recent development, at least I've
never seen it before and I've always used a plain integer. Could portage be
skipping over it when it doesn't find a decimal point? That would be easier to
fix than a wholesale failure of function.

I still see two separate issues.  First, you are saying that emerge still launches new jobs when the load is over what is set with --load-average.  A possible way to test this directly is to run or create some job that pushed the load average to over some number, say 5.  (It doesn't have to be high, just predictable, although a higher load would make a more obvious result.)  Then start an emerge of two or more packages with --load-average=3.  It should start the first job, and should then not start another until the load is below 3 or the first job has finished.  You can try with both 3 and 3.0.  If the second job does get started, this is an easy to run, concrete test you can post to the bug.

The second issues is whether MAKEOPTS --load-average is actually getting passed to each job and whether make is then observing that limit.  Whether this is the case or not is independent of the first issue.  I suppose this could be tested without even involving emerge.  Given you observed an actual load of 72 (do I remember correctly?) with both --load-averages set significantly below this, you could test, as long as you have a single compile which is busy enough.

Another possible test would be (for example) to set emerge's --load-average to 2 or 2.0 and MAKEOPT's --load-average=10.


Reply via email to