Objetive: Set CPU speed to max
Issue:
Setting CPU performance is not working properly in Ubuntu 20.04 for old Xeon (max 3GHz). Trying to set it to MAX all the time.
Checking current setting:
$ more /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
::::::::::::::
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
::::::::::::::
ondemand
::::::::::::::
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
::::::::::::::
ondemand
::::::::::::::
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
::::::::::::::
ondemand
::::::::::::::
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
::::::::::::::
ondemand
Changing setting manually:
$ sudo -i$ echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
However, this setting will revert after reboot.
Step 1. Changing in BIOS
For my PC (Dell workstation), SpeedStep can be disabled in BIOS.
After reboot, the CPU speed still fluctuate.
Step 2. change boot option in grub
$ sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=0 processor.max_cstate=1 pcie_aspm=off quiet splash"
Step 3. disable 'ondemand'
$ systemctl is-enabled ondemand
$ systemctl disable ondemand
and reboot.
References
- https://stevescargall.com/2020/02/12/how-to-set-linux-cpu-scaling-governor-to-max-performance/
- https://ixnfo.com/en/changing-cpu-scaling-governor-on-linux.html
No comments:
Post a Comment