On 5/11/23 18:07, Peter Humphrey wrote:
On Thursday, 11 May 2023 17:18:17 BST Mark Knecht wrote:
I'm sure you get this but I'm pointing toward the EMERGE_DEFAULT_OPTS
portage variable which, according to it's page that "defines entries to be
appended to the emerge command line." I suspect they are appended, but
that doesn't guarantee that they override other entries that you are adding
by hand or have somewhere else. It seems reasonable to me that you
might just use this setting with nothing else and see if you can get it
under control.
I think that's worth a shot. And no, I don't have any other entries.
Note the blue section on the page:
Note
When MAKEOPTS="-jN" is used with
EMERGE_DEFAULT_OPTS="--jobs K --load-average X.Y" the number
of possible tasks created would be up to N*K. Therefore, both variables
need to be set with each other in mind as they create up to K jobs each
with up to N tasks.
The ''problem' is this can easily hit 100% of the cores you have in the
machine if not sensibly set. (You choose what's 'sensible')
Once again, --load-average is being ignored. Why is it there? Surely, it must
be to mitigate the worst effects of that N*K, but it isn't doing so.
Sorry if I'm repeating myself, but as I see it, there are two different
--load-average settings to consider. I'd have to go back to the
beginning of the thread to confirm you are setting both of them.
The --load-average to emerge itself just tells it not to start a new job
if the load is above the setting. If there are several large jobs, but
all start with single threaded configuration activity such as
./configure or cmake, multiple jobs can clearly get started before the
load average starts climbing.
The --load-average in MAKEOPTS gets passed to make, and controls how
many processes make starts. If that is set, and the load is still too
high, the problem is in make not in emerge. Also, that setting will
have no effect if the package uses ninja or something else instead of
make. Ninja does have a -l setting for load average, but I don't know
if emerge passes any MAKEOPTS to ninja. That might be an interesting
enhancement request.
Jack