Frequency scaling
How to disable frequency scaling
This guide explains an easy way to disable frequency scaling.
First thing to do is to check the number of CPUs in the system with the command:
ls /sys/devices/system/cpu/
The provided output will be something like this:
cpu0 cpu2 cpuidle kernel_max modalias online power uevent cpu1 cpu3 intel_pstate microcode offline possible present
and in this case the number of physical CPUs for which we can disable frequency scaling is four, namely cpu0
, cpu1
, cpu2
and cpu3
.
With the following script executed by with the root privilege:
for i in $(seq 0 3) ; do echo "performance" > /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor; done
we can set the performance
governator policy, which disable frequency scaling. We used $(seq 0 3)
because we have 4 CPUs, from cpu0
to cpu3
. In a system with 8 physical cores, the correct command would have been $(seq 0 7)
. Remember that the script must be re-executed each time the system is restarted.
To check that frequency scaling is effectively disabled, you can type many times the following command checking that the frequencies of your CPUs are fixed to the highest values:
cat /proc/cpuinfo
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/frequency_scaling