User Tools

Site Tools


cs:frequency_scaling
Return to Home page

Differences

This shows you the differences between two versions of the page.


cs:frequency_scaling [2024/04/08 22:34] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== 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:
 +<code bash>
 +ls /sys/devices/system/cpu/
 +</code>
 +The provided output will be something like this:
 +<code bash>
 +cpu0  cpu2  cpuidle       kernel_max  modalias  online    power    uevent
 +cpu1  cpu3  intel_pstate  microcode   offline   possible  present
 +</code>
 +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:
 +<code bash>
 + for i in $(seq 0 3) ; do echo "performance" > /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor; done
 +</code>
 +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:
 +<code bash>
 +cat /proc/cpuinfo
 +</code> 
 +
 +
  

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?rev=1554386521&do=diff

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki
Privacy Policy