I am running Ubuntu basic server with two processes: - process 1 - performing calculation 100% of uptime, and which I use to share computing power to community (it's running @ prio 19) - process 2 - performing calculations for 5-10mins, from time to time, which I use to compute for me (it's running @prio -19)
I want process 2 to be given with 100% of computing power (process 1 is at that moment should get close to 0% of CPU).
I have tried to use nice / renice and process 1 is given with prio 19 (lowest possible) and process 2 is given prio -19 (highest possible). But best what I get is 50% of CPU for process 1 and 50% of CPU for process 2 (checked with htop) - which kind of surprised me...
Both processes are multithreaded, and - when running alone - consume 100% of all cores of CPU. No other resources (I/O, memory, bandwidth, ...) can influence this usage.
I don't want to manually stop/start any process when I need computing power (both processes must be running all the time); 100% of CPU for process 2 must be given automatically.
What should I do to achieve my goal? Thanks.