How To Set CPU Scaling Governor to Max Performance (scaling_governor)

Version 4

    This is a configuration guide to modify CPU performance.

    The "scaling_governor" feature enables setting a static frequency to the CPU.

    Frequency value must be between scaling_min_freq and scaling_max_freq.

    When CPU frequency governor is set to "powersave" mode, CPU is set to the lowest static frequency (within the borders of scaling_min_freq and scaling_max_freq).

    To achieve maximum performance, It is recommended to set The CPU frequency governor, "scaling_governor",  to "performance" mode.

     

    References

     

    Configuration

    1. To view the current scaling_governor value per CPU, run:

    # cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

    powersave

    powersave

    powersave

    powersave

    powersave

    ...

     

    2. To set the scaling_governor to "performance" mode for each CPU, run:

    # echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    # echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

    # echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

    # echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

    ...

     

    3. To verify configuration, run:

    # cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

    performance
    performance
    performance
    performance

    ...

     

    4. To view and compare current frequency to the min and max scaling, run:

    # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

    3300000

     

    # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

    1200000

     

    # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

    3210156