If you have a Hetzner server with one of the recent CPU types you might be running in powersave mode. This is because the new CPUs don't support ondemand anymore. Also, some revisions of the ubuntu server image contain a typo which might cause this problem even with an older CPU.
Verify you are on powersave
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Check if you already have:
- service:
sudo service cpufrequtils status
- file:
file /etc/default/cpufrequtils
- service:
Check available governors (it probably doesn't have ondemand if it's a newer (intel?) CPU)
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Edit file /etc/default/cpufrequtils (it has typo and nonexistant governor)
REPLACE: GOVENOR="ondemand"
WITH: GOVERNOR="performance"Disable ondemand service (it doesn't know about performance and will always set it to powersave)
sudo service ondemand stop
sudo update-rc.d ondemand disable
orsystemctl disable ondemand
Restart the service and verify after a few seconds
sudo service cpufrequtils restart
sudo service cpufrequtils status
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Make sure it stays that way
- After upgrading the Ubuntu release the ondemand service was back at work.
- Monitoring this value is recommended, I'm using my poor man monitoring