Notes to Self

Alex Sokolsky's Notes on Computers and Programming

Proxmox Power Saving

Sources

Just in case you have AMD CPUs: thread3.

Monitor CPU frequency

% cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

better yet:

watch grep \"cpu MHz\" /proc/cpuinfo

Install cpupower

More on cpupower.

% cpupower
WARNING: cpupower not found for kernel 5.4.0-66

  You may need to install the following packages for this specific kernel:
    linux-tools-5.4.0-66-generic
    linux-cloud-tools-5.4.0-66-generic

  You may also want to install one of the following packages to keep up to date:
    linux-tools-generic
    linux-cloud-tools-generic

% apt install linux-tools-common

or

% apt install linux-cpupower cpufrequtils

Then

root@fuji:~# cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 3.90 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 3.90 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.90 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

About governors:

Show Scaling Driver

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

Enable CPU Turbo Boost

Just make sure that:

root@duo:~# cat /sys/devices/system/cpu/intel_pstate/no_turbo
0

To change governor:

root@suprox:~# cpupower frequency-set -g powersave
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3

intel-pstate vs acpi-cpufreq

Is this still true? acpi-cpufreq is better. Switch the governor to acpi-cpufreq.

Enable Power Saving

To enable PowerSave (instead of Performance) governor:

% echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Switch back to intel_pstate Governor

Ensure intel_pstate=enable is there for GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub. Then sudo update-grub and reboot.

To check:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver