[TUTORIAL] Fix always high CPU frequency in proxmox host.

Wrong, just edit the /etc/default/cpufrequtils and change to GOVERNOR="schedutil"

I do not have a /etc/default/cpufrequtils file; what could be the reason? Oh wait; I have to install the additional package cpufrequtils first. ;)

What is the advantage of using cpufrequtils, instead of a simple small cronjob, if someone only wants to change the used governor?

And why makes one possible option another possible option "wrong"? Are multiple possible options not allowed?
 
There's no need to install a package or cronjob.
Package cpufrequtils can still be installed and is maintained.
But yet for how long? Debian wiki states it will be replaced by cpupower [0].

Since 5.9 there's a kernel command line parameter to set the default cpufreq governor [1].
Checked in the current pve kernel 5.15.x and the parameter is there [2].
This is much better in my opinion as you can see this parameter in your logs every boot.
You can just check with cpupower frequency-info, or via sysfs of course.

Set it and be sure to run proxmox-boot-tool refresh.


[0] https://wiki.debian.org/CpuFrequencyScaling (last edited 2019)
[1] https://kernelnewbies.org/Linux_5.9#CPU_Frequency_scaling
[2] https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html
 
Last edited:
There's no need to install a package or cronjob.
Package cpufrequtils can still be installed and is maintained.
But yet for how long? Debian wiki states it will be replaced by cpupower [0].

Since 5.9 there's a kernel command line parameter to set the default cpufreq governor [1].
Checked in the current pve kernel 5.15.x and the parameter is there [2].
This is much better in my opinion as you can see this parameter in your logs every boot.
You can just check with cpupower frequency-info, or via sysfs of course.

Set it and be sure to run proxmox-boot-tool refresh.


[0] https://wiki.debian.org/CpuFrequencyScaling (last edited 2019)
[1] https://kernelnewbies.org/Linux_5.9#CPU_Frequency_scaling
[2] https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html
Thanks for this.
When I update kernel commandline, I usually run update-grub directly and don't use proxmox-boot-tool
Having just tried proxmox-boot-tool refresh, I notice no modifications are made to /boot/grub/grub.cfg and therefore new boot args won't be applied.
 
Hi, then you are probably running legacy boot, without proxmox-boot-tool.
Fresh pve installs will now use proxmox-boot-tool automatically.
You may want to consider migrating to proxmox-boot-tool if you are running your system with root on zfs.
fe, from the admin doc:
A system with root on ZFS, that still boots using grub will become unbootable if a new feature is active on the rpool, due to the incompatible implementation of ZFS in grub.
See [0] and [1]
You can run proxmox-boot-tool status to see current status, but if you have upgraded an older system (pre pve 6.4) and not migrated manually then you probably are running legacy boot.
If you do plan to migrate, read the docs carefully first, and perhaps test the migration steps in a (nested) pve vm.

EDIT: if more discussion on the proxmox-boot-tool is needed, we should move that to a separate thread.

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysboot
[1] https://pve.proxmox.com/wiki/ZFS:_Switch_Legacy-Boot_to_Proxmox_Boot_Tool
 
Last edited:
Hi, then you are probably running legacy boot, without proxmox-boot-tool.
Fresh pve installs will now use proxmox-boot-tool automatically.
You may want to consider migrating to proxmox-boot-tool if you are running your system with root on zfs.
fe, from the admin doc:

See [0] and [1]
You can run proxmox-boot-tool status to see current status, but if you have upgraded an older system (pre pve 6.4) and not migrated manually then you probably are running legacy boot.
If you do plan to migrate, read the docs carefully first, and perhaps test the migration steps in a (nested) pve vm.

EDIT: if more discussion on the proxmox-boot-tool is needed, we should move that to a separate thread.

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysboot
[1] https://pve.proxmox.com/wiki/ZFS:_Switch_Legacy-Boot_to_Proxmox_Boot_Tool

You're correct, this is an in place upgrade. I don't use ZFS. Thanks for the references.
 
  • Like
Reactions: janssensm
There's no need to install a package or cronjob.
Package cpufrequtils can still be installed and is maintained.
But yet for how long? Debian wiki states it will be replaced by cpupower [0].

Since 5.9 there's a kernel command line parameter to set the default cpufreq governor [1].
Checked in the current pve kernel 5.15.x and the parameter is there [2].
This is much better in my opinion as you can see this parameter in your logs every boot.
You can just check with cpupower frequency-info, or via sysfs of course.

Set it and be sure to run proxmox-boot-tool refresh.


[0] https://wiki.debian.org/CpuFrequencyScaling (last edited 2019)
[1] https://kernelnewbies.org/Linux_5.9#CPU_Frequency_scaling
[2] https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html
As stated, cpupower will be replaced, but cpufrequtils is the default right now on Proxmox, and come preinstalled with 7.2(at least), not needing install anything, that why I said `wrong` to @Neobin.
 
cpufrequtils is the default right now on Proxmox, and come preinstalled with 7.2(at least), not needing install anything, that why I said `wrong` to @Neobin.

My fresh installation with the official 7.2-ISO from the official Proxmox site does not have cpufrequtils pre-installed!
Maybe I downloaded the wrong 7.2-ISO? Or maybe I installed PVE the wrong way? ;)

Anyway, fortunately everyone can do it however they want. :cool:
 
  • Like
Reactions: janssensm
My fresh installation with the official 7.2-ISO from the official Proxmox site does not have cpufrequtils pre-installed!
Maybe I downloaded the wrong 7.2-ISO? Or maybe I installed PVE the wrong way? ;)

Anyway, fortunately everyone can do it however they want. :cool:
My bad, I misplaced the dns name from my new installed proxmox server v7.2 when doing ssh, with the old one, to check the package installed.
 
Since frequency scaling can cause all sorts of behaviour
I was troubleshooting and saw a significant increase in cpu usage in all monitoring tools running, in all vm's and on the host. But that seems to be expected as the host will run on a lower frequency a lot of the time, which it would not if running performance governor.
So I was a bit misled by the monitoring stats, could not find another system change than selecting schedutil as governor. And you could argue that for monitoring your system, schedutil will not make troubleshooting easier ;)

edit: and to confirm, after changing governor to performance, monitoring stats were back like before schedutil change.
 
Last edited:
  • Like
Reactions: gbschenkel
is the amd_pstate driver now working? Or when will it be integrated? In kernel 15.17?
I tried to test it with current proxmox and kernel 5.15 and enabling it via
modprobe amd_pstate
but it didn't work and I couldn't remove the acpi-cpufreq module via modprobe -r as it is builtin...

I just want to test it. Is it possible?
Currently I use onDemand governor with acpi-cpufreq driver.
 
I have followed this guide and ended up using echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor to reduce power usage on my 12900K CPU, so far so good.

I want to make this setting persistant across reboots of Proxmox. How do I do this please?
 
Add it to your crontab:
crontab -e and then add this line @reboot echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 
  • Like
Reactions: mikeyo
An alternative would be to add: cpufreq.default_governor=powersave to your kernel command line [1], like mentioned by:
There's no need to install a package or cronjob.
Package cpufrequtils can still be installed and is maintained.
But yet for how long? Debian wiki states it will be replaced by cpupower [0].

Since 5.9 there's a kernel command line parameter to set the default cpufreq governor [1].
Checked in the current pve kernel 5.15.x and the parameter is there [2].
This is much better in my opinion as you can see this parameter in your logs every boot.
You can just check with cpupower frequency-info, or via sysfs of course.

Set it and be sure to run proxmox-boot-tool refresh.


[0] https://wiki.debian.org/CpuFrequencyScaling (last edited 2019)
[1] https://kernelnewbies.org/Linux_5.9#CPU_Frequency_scaling
[2] https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html

[1] https://pve.proxmox.com/wiki/Host_Bootloader#sysboot_edit_kernel_cmdline
 
  • Like
Reactions: mikeyo
thank you both for your suggestions, I am using cron and all OK, 12900K at 23 degrees idle 0.75V and very low power consumption.
 
is the amd_pstate driver now working? Or when will it be integrated? In kernel 15.17?
I tried to test it with current proxmox and kernel 5.15 and enabling it via
modprobe amd_pstate
but it didn't work and I couldn't remove the acpi-cpufreq module via modprobe -r as it is builtin...

I just want to test it. Is it possible?
Currently I use onDemand governor with acpi-cpufreq driver.
Incase you're still looking

https://forum.proxmox.com/threads/amd-pstate-driver-steps-and-discussion.118873/
 
There's no need to install a package or cronjob.
Package cpufrequtils can still be installed and is maintained.
But yet for how long? Debian wiki states it will be replaced by cpupower [0].

Since 5.9 there's a kernel command line parameter to set the default cpufreq governor [1].
Checked in the current pve kernel 5.15.x and the parameter is there [2].
This is much better in my opinion as you can see this parameter in your logs every boot.
You can just check with cpupower frequency-info, or via sysfs of course.

Set it and be sure to run proxmox-boot-tool refresh.


[0] https://wiki.debian.org/CpuFrequencyScaling (last edited 2019)
[1] https://kernelnewbies.org/Linux_5.9#CPU_Frequency_scaling
[2] https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html
Hi jans~ I'm using intel xeon 6148 processor, I just want to see whether my cpu can reach the Turbo Frequency. 3.70 GHz.
So I run s-tui for test. But I got all the processor are at the top of 2.4GHz and not gonna Breakthrough.
And I use the cpupower frequency-info command but got those info:
Code:
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  CPUs which run at the same hardware frequency: Not Available
  CPUs which need to have their frequency coordinated by software: Not Available
  maximum transition latency:  Cannot determine or is not supported.
Not Available
  available cpufreq governors: Not Available
  Unable to determine current policy
  current CPU frequency: Unable to call hardware
  current CPU frequency:  Unable to call to kernel
  boost state support:
    Supported: no
    Active: no
And I have no idea what to do to get/set some config the cpu strategy
 
please I need help.
I have nuc13i5
intel p_state is active
I tried to disable it with 1st topic guide but at reboot I see it still enabled and no acpi driver loaded.
maybe somthing wrong from my side?

or last nucs has a security option that cause this?

I have only scaling_governor
performance
powersave


I want to swap to acpi becuse seems that intel_pstate drive cpus at 2.20ghz when idles..

analyzing CPU 15:
driver: intel_pstate
CPUs which run at the same hardware frequency: 15
CPUs which need to have their frequency coordinated by software: 15
maximum transition latency: 4294.55 ms.
hardware limits: 400 MHz - 3.40 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 400 MHz and 3.40 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency is 2.20 GHz.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!