January 12, 2021

[Note] Set CPU to max for Ubuntu 20.04

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


No comments: