How to Change CPU Performance on Linux? (Scaling Governor) (Tuning)
| F.A.Q. • SupportHow to Change CPU Performance on Linux? (Scaling Governor) (Tuning)
- How to change CPU performance on Linux?
- How to change CPU frequency on Linux?
The Scaling Governor is a function that controls the CPU clock frequency based on the load and energy demand. The scaling governor can be set to various modes, such as:
- Performance - The CPUfreq "performance" governor sets the CPU to a constant clock frequency, which is the highest within the limits specified by scaling_min_freq and scaling_max_freq.
- Powersave - The CPUfreq "powersave" governor sets the CPU to a constant minimum clock frequency within the limits specified by scaling_min_freq and scaling_max_freq.
- Userspace - The CPUfreq "userspace" governor allows a user or any program running in the user space with "root" privileges to set the CPU to a specific frequency by providing a sysfs file named "scaling_setspeed" in the CPU device directory.
- Ondemand - The CPUfreq "ondemand" governor adjusts the CPU frequency according to the current system load. The load estimation is triggered by the scheduler through the "update_util_data->func" function. Upon triggering, cpufreq analyzes the CPU usage statistics over the last period and adjusts the CPU frequency accordingly. The CPU must be capable of very rapid frequency changes.
Each of the above governors has a different strategy for changing the CPU frequency to optimize performance or save energy. The scaling governor can be changed by the user or the operating system, depending on preferences and hardware compatibility.
To see the current scaling_governor settings per CPU:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
- Test platform Supermicro NVMe 1029U-TN10RT + Intel Virtual RAID on CPU (VROC)
- "Phoronix Test Suite - a platform for benchmark testing."
- Network troubleshooting - Step by step (Why is the server not connected to the network?)
- Linux tools - Hdparm - (Disk management and bandwidth testing).
- Threats Associated with Using IPMI in Publicly Accessible Networks and the Necessity of Regular Updates - IPMI Best Practices
- How to Disable CPU Cores in Linux (How to limit power consumption server)
- Automatic power-on after a power outage on the Supermicro X13SCH-LN4F motherboard