I want to share something I recently discovered while running Home Assistant in a Proxmox 6.4-12.
You can tune a Proxmox installation to consume less power with a simple command.
In a default Proxmox configuration the OS is tuned to “performance”. In my case it means the CPU is running 100% all the time. It’s possible to configure a different profile so the CPU is “sleeping” more. And a more idle CPU means less power usage. These CPU states are called CPU governor states.
The amount of power saving depends on:
- your CPU model
- your load inside Proxmox
So your mileage may vary.
Take a look as follows:
- go to your Proxmox console
- click on a node
- open a shell for that node
- in the shell, at the command prompt enter
to see the list of available CPU governor states
(I have ‘powersave’ and ‘performance’)
echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
to enable a more power efficient state
- measure the power usage of your computer
I got the following results by switching from “performance” (default setting) to “powersave”:
- Intel NUC i5 Boxnuc8I5Beh2, Intel® Core™ i5-8259U Processor (6M Cache, up to 3.80 GHz), Home Assistant 2021.7.3, mqtt broker, NodeRed, InfluxDB, Grafana
power consumption went from constantly between 14-23 Watts to 8 Watts with spikes to 15 Watts.
- HP T630 thin client, quad core AMD GX-420GI 2.2 Ghz processor, running Home Assistant 2021.7.3 only
idle power usage went from 22 Watts average to 10 Watts average
The command to set the power state needs to be given after every Proxmox restart.
You can automate this by having a ‘@reboot’ entry in your crontab.
If you are getting emails after crontab executes, try
echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null 2>&1
In my country the Netherlands using 10 Watts for 365 days / 24 hours per day means an additional electricity bill charge of about 20 euros (based on a kWh charge of 24 eurocents per hour)
I am not noticing longer reponse times or instability since I switched over to the “powersave” profile. So I will continue using the “powersave” profile and enjoy lower CPU temperatures and a lower power bill.
Please share your experiences!