Changing the processor core frequency in Linux

To see the minimum, current and maximum frequency of the processor cores, execute the command:

grep '' /sys/devices/system/cpu/cpu0/cpufreq/scaling_{min,cur,max}_freq

For example, in my case, the following is displayed:


On idle servers, there is probably no point in raising the minimum frequency of the processor cores, but on heavily loaded ones, such as the access server for example, I usually increase, because the processor is constantly loaded, jumping frequencies only hinder and judging by the graphs after the changes, the load on the processor decreases noticeably.

To set the minimum frequency for all processor cores to the same as the maximum, create a script with the code below and execute it:

cpucount=$(grep -c 'model name' /proc/cpuinfo)
for cpu in $(eval echo cpu{0..$((cpucount-1))}); do
        cat $sysdir/$cpu/cpufreq/scaling_max_freq > $sysdir/$cpu/cpufreq/scaling_min_freq
Подписаться на IT Blog (RU) по Email
Subscribe to IT Blog (EN) by Email

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a Reply