On 5/11/23 23:23, Eldon wrote:
On Thu, May 11, 2023 at 11:07:04PM +0100, Peter Humphrey wrote:
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.
Take all of the following with a grain of salt and YMMV. Any gentoo
pro's please correct my ideas here:
I have also been experimenting along the lines of making emerge nicer
via a few quick strategies, and while it doesn't address your issue
directly, I'll tell you some of the things that have made it more
enjoyable to use a machine while it is building packages:
1) Niceness: I set the following in my make.conf, since I value
responsiveness of the machine over the speed of the build:
```
PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
PORTAGE_NICENESS=19
```
2) Load average: I will trade some build time for responsiveness, so I
go ahead and use `taskset 2-100 emerge ...` on linux to prevent emerge
from using the first two cores/threads. I don't have a machine with a hundred
cores, but if I did, it would make a little heat....
3) I set --load-average on the command line and in the make opts. No need
to run too wild. I make sure this is less than the number of cores I
allocated with taskset, or I think I may not hit the designated load
average for limiting.
4) ONLY if I have the RAM, mount /var/tmp or /var/tmp/portage as a
tmpfs. If I am merging very large projects (firefox and llvm for
example) concurrently, I may need more than several 10's of GB of RAM
for this. If I don't usually run the machine with substantial swap space
enabled, this might be a good time.
I think with those strategies, it is ok to just run emerge with `-j`
with no arguments. The cores prohibited from participating in emerge
will be available for interactive tasks, and the load average will limit
to some degree the number of processes.
If you give this a try, let me know what you think!
Eldon
Don't set PORTAGE_IONICE_COMMAND or PORTAGE_NICENESS. I just set
PORTAGE_SCHEDULING_POLICY="idle". My MAKEOPTS are "-j12 -l12" and I have
"--jobs=12" in EMERGE_DEFAULT_OPTS (6c12t CPU). Anything that uses rust
(cargo seems to not support load so runs into problems, but setting
scheduling policy should help) or webkit you might want to lower
MAKEOPTS jobs via env overrides.