CPU frequency governor schedutil and Intel Xeon 4310

Mrt12

Well-Known Member
May 19, 2019
130
9
58
44
Hi all,
my problem is not exactly 100% only Proxmox related, but I ask here anyway, as I found this information here.

I have a homelab server with Supermicro X12 board and Intel Xeon 4310. It works very good and is much more pleasant than the HPE Microserver I had before that had a very weak CPU and so on.
However, it uses a lot of electricity and therefore heats my room.
I wanted to optimise the energy efficiency a bit, and for this reason, I found there are these "scaling governors". I found this here

https://forum.proxmox.com/threads/fix-always-high-cpu-frequency-in-proxmox-host.84270/

so I found I give this a try. Indeed, the "powersave" governor gives me some 60 Watts (!) power reduction. I am not at 120 W, with 6 SSDs and 2 SAS HDDs. While this is much more than my HPE Microserver had, I am happy with this, as it gives quite decent performance.

However, I wanted to tweak this a bit further and try to optimise power consumption. I thought, the "schedutil" governor will be better, as it does not set a fixed minimum frequency but, if there is more work to do for the CPU, it can increase the frequency. This is exactly what I need - most of the time, my server sits & waits, by serving some SAMBA shares, Nextcloud and stuff. But, when there is something to do, I want good performance. "powersave" is like if you have a Ferrari car and drive around with the handbrake engaged, right? while "performance" is driving around with the full speed all the time, which is also not necessary. For this reason I wanted to use schedutil.

I did a couple experiments, with good results, i.e. the temperatures became lower, and I still had a decent CPU frequency ("lscpu | grep MHz").

I then decided I shut down the server, plug it into a Wattmeter, and while booting it, I will also examine the BIOS settings to try to find further power saving options.

And here comes my problem. Either by some changed BIOS setting, or due to the reboot (hadn't rebooted since couple months!), my CPU governors got somehow lost. Today, I still had

performance schedutil powersave conservative

which I found by

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

however, after my tweakings and the reboot, I only have left "powersave" and "performance". And for the heck of it, I cannot figure out which option in the BIOS got me rid of "schedutil". So I wonder - is there one Proxmox or Kernel update in the past couple months that got rid of schedutil somehow?

I found this

https://www.reddit.com/r/linuxquest...til_governor_not_available_with_intel_pstate/

which is a bit dated, and also I don't have intel_pstate

Code:
root@pve0:~# lsmod | grep intel
intel_rapl_msr         20480  0
intel_rapl_common      36864  1 intel_rapl_msr
intel_uncore_frequency    12288  0
intel_uncore_frequency_common    16384  1 intel_uncore_frequency
intel_powerclamp       16384  0
kvm_intel             389120  4
kvm                  1249280  3 kvm_intel
ghash_clmulni_intel    16384  0
aesni_intel           356352  0
crypto_simd            16384  1 aesni_intel
cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
intel_th_gth           24576  0
intel_th_pci           12288  0
intel_cstate           20480  0
intel_th               24576  2 intel_th_gth,intel_th_pci
intel_vsec             20480  0
intel_pch_thermal      16384  0
spi_intel_pci          12288  0
spi_intel              28672  1 spi_intel_pci

on the other hand, "dmesg" says something else:

Code:
root@pve0:~# dmesg | grep intel
[    2.360298] intel_pstate: Intel P-state driver initializing
[    2.363998] intel_pstate: HWP enabled
[    5.639169] intel_th_pci 0000:00:02.4: enabling device (0000 -> 0002)
[    6.360552] intel_rapl_common: Found RAPL domain package
[    6.360560] intel_rapl_common: Found RAPL domain dram

so what is going on here? in the BIOS I have configured "energy efficient" under CPU options, and also "OS controls energy balance".


Is there some other tweak I could install to lower the CPU frequency, but increase it when it is demanded? I think I previously had all these options, but since the reboot, they are all gone. I stick for now with "powersave" but I am unsure if this is the best option.
 
Last edited:
You can check the used driver with:
Bash:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
If it is intel_pstate, then powersave is indeed what you are looking for, because it operates completely different than with the other driver that was used before: [1].

Did you actually check, if the frequency scaling works with powersave on intel_pstate?

[1] https://wiki.archlinux.org/title/CPU_frequency_scaling#Autonomous_frequency_scaling
 
Last edited:
Hi,
I don't know why I previously had the other governors, like schedutil. But indeed, I have now only "powersave" and "performance" and I set to "powersave". According to my Watt meter, I have still the same savings like before, approx. 40 to 50 Watts, and further, with lscpu | grep MHz I can indeed see that the CPU frequency is lowered to 38%:

Code:
# lscpu | grep MHz
CPU(s) scaling MHz:                   38%
CPU max MHz:                          2100.0000
CPU min MHz:                          800.0000

and I also can observe that the temperatures are all much lower! phantastic. However is the intel_pstate the best option, or should I disable it and use schedutil? and, further, could I lower the frequency even more to save more power?

I just also installed powertop and I found the following:

1725286360263.png

I am no expert, but so far it looks good, as the CPU is often in C6. Can I also let it go to C7 somehow? or is this not worth the power savings?
 
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!