Don’t let low priority jobs throttle up your cores

On laptop, low priority background processes can kill your battery really fast even if you’re using the ‘ondemand’ cpu frequency scaling. This remark also applies to saving power on desktop.
With lowest priority, any intensive process will still throttle up your cpu frequency. You usually want it to take only the remaining cpu cycles, not caring about how long this task takes.

You can solve this problem by asking the ondemand cpu governor to ignore tasks with nice values higher than default.
To apply this on every core on the system:

echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

For permanent use, as it’s done though the /sys/, you’ll need to add it to your rc.local or a custom init.d script ( sysctl.conf can’t be used here ).

Leave a Reply