Stop specific processes from heating up my system's CPU
3
votes
2
answers
430
views
I have a process doing some computation the whole time. It causes my system's CPU to heat up and the fan to spin faster.
I want this process to run, but with a low priority. I don't want my system to heat up and my fan to spin because of it. Is it possible to achieve this?
If it matters, my CPU is an AMD Ryzen 5 3500U and the process is a browser tab (I'm running it in Chromium, but am happy to change browser if it helps). I'm willing to even run the whole browser inside a VM if it helps.
---
What I tried and why it failed:
1. The best solution found so far is limiting the maximum CPU frequency:
echo 0 > /sys/devices/system/cpu/cpufreq/boost
cpupower frequency-set -u 1200MHz
It works, but it means that other processes are affected too: compiling, (un)compressing etc takes way longer.
Moreover, the CPU is still warmer than if the process wasn't running. Although to acceptable temperatures.
2. [cpulimit](https://github.com/opsengine/cpulimit) cripples the performance of the target process.
If I set the percentage of CPU allowed to 50% (cpulimit -l 50 -p ...
), the computation becomes a lot slower than normal (like 10x as slow; I don't have a good way to measure the accurate slowdown).
3. I played around with cgroups for a bit, but couldn't get any effect.
4. Nice has no effect of course.
Is there anything else I should try?
Asked by peoro
(3938 rep)
Aug 19, 2020, 06:27 AM
Last activity: Aug 19, 2020, 09:29 PM
Last activity: Aug 19, 2020, 09:29 PM