Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

 
alt

Daniel Nashed

 

Proxmox energy savings options for home labs

Daniel Nashed  4 March 2024 13:09:10

My Proxmox server often starts it's fan to speed up and the little box was getting hot.

I revisited what I looked into earlier and found some interesting details to setup power saving correctly.

This isn't just important for home office silence, but also can reduce power consumption and even might save costs when operating a permanent server.


The following has been tested with Intel CPUs. Some if it might apply to other CPUs as well. Pretty sure Intel_pstate is not available of other CPUs.

In my case I am running a small Intel NUC with 4 CPU cores and a maximum CPU frequency of 3.6 Ghz.

The settings described below is my current state of what I found out and they also need to be manually set after statup.


If you are looking into this on your own and you have the same or different results, please let me know.

I am still experimenting. But this is what I found out this morning as a good starting point.


-- Daniel



cpufreq/scaling_governor


The first setting to look at is the scaling governor, which which is referenced in the Proxmox forum to be the main tunable.


To check settings for all CPUs run this command:


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


The current frequency can be checked like this:


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


To watch it for a while you can add the "watch" command


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


To change the settings to power save use the following command:


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


tee will print the result to the console and writes it to all CPU cores at once.




cpufreq/energy_performance_preference



Another setting to look at is the energy performance preference.

This setting was my main tunable as it turned out.


To check the current settings use the following command:


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


To set the preference to let the machine run in balanced mode with the favor of power saving, set the following option


echo balance_power | tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference



Options available:


For a standard home server you might choose "balance-power". But it you really care more about energy consumption than performance, you might want to go with "power".


performance

Set a policy for maximum performance, accepting no performance sacrifice for the benefit of energy efficiency.


balance-performance

Set a policy with a high priority on performance, but allowing some performance loss to benefit energy efficiency.


balance-power

Set a policy where the performance and power are balanced.


power

Set a policy where the processor can accept a measurable performance impact to maximize energy efficiency.




cpufreq -- A tool to check current performance


In my case I am using Ubuntu, where you can install the CPU frequency tools like this:


apt update

apt install cpufrequtils



To query the driver and current frequency settings use the info tool to show information per CPU core.


cpufreq-info




Intel_pstate


When running with Intel CPUs there is another option.

You can tune a couple of settings. The main one is the max_perf_pct

Per default the setting allows to use 100% CPU frequencies.

But if you really want to reduce the power consumption and not get your CPUs hot, you can lower the maximum frequency the CPUs run on in percentage of the maximum capacity.


To check the current settings run this command:


cat /sys/devices/system/cpu/intel_pstate/max_perf_pct



Setting it to 70% could reduce the maximum CPU frequency, lowers to power consumption and also makes your machine run much more silent.


echo 70 > /sys/devices/system/cpu/intel_pstate/max_perf_pct


This is probably the most drastic option, but allows you full control of your CPU frequency.


Reference:
https://www.kernel.org/doc/html/v5.0/admin-guide/pm/intel_pstate.html

Links

    Archives


    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]