Hi all! I have a little question for you.
Let's say my machine has 4 cores (4 physical and logical cores, no hyper-threading). I want to run 5 cpu-bound processes, but one of them should get CPU only when there's some to spare. I'm expecting seeing in top something like this:
process-1 99.9% cpu
process-2 99.9% cpu
process-3 99.9% cpu
process-4 99.9% cpu
process-5 0.4% cpu
All my processes are commands started from different terminals on my desktop.
On Ubuntu 22.04 (Linux 5.15.0) I can achive this setting sysctl kernel.sched_autogroup_enabled=0 and running my process 5 with nice -n 19. Works great.
Now I'm moving to Ubuntu 26.04 (Linux 7.0.0) and this doesn't work anymore, all my processes get 80% CPU no matter the niceness value.
I tried running process 5 with chrt --idle 0 , it has some effect but nowhere near what I'd like.
Why I want to to this? Because I regularily run many different cpu-bound workloads in different terminals, and I want some of them finish as soon as possible (normal priority), and others can last longer and I prefer them not to interfere (lowest priority) as long as there are normal priority processes running.
Is there a way to have truly low priority processes on recent kernels?
Edit: I don't have necessarily one normal-priority process for each core. For example, this is another possible use case where 5 processes take all the 4-core pie and a sixth process eats the crumbles:
process-1 79.9% cpu
process-2 79.9% cpu
process-3 79.9% cpu
process-4 79.9% cpu
process-5 79.9% cpu
process-6 0.5% cpu