Low Power Server with Powertop & Proxmox
If you are like me and using mini PCs for home lab servers as your main workload servers, you are likely doing this for power efficiency reasons. I have gone from true enterprise servers in the home lab down to mini PCs, as for me, this makes the most sense with the performance and efficiency of today’s mini PCs. However, you can have an even more low-power Proxmox VE Server with a simple software install on your Proxmox VE Server. Let’s see how we can do this with the Linux Powertop tool.
Table of contents
What is Linux Powertop?
Let’s take a quick look at what the Linux Powertop command is exactly. It is a command line tool that is designed to help with tweaking and lowering power consumption. It provides a really cool way to view power usage, what is consuming power on a Linux system, and an easy way to optimize it.
As you can imagine, it is a good tool to use for laptops and mobile devices that you want to make sure are the most efficient on battery use as possible. With Powertop, you can see a real-time look at the power use of devices and software processes.
Also, what is interesting about the tool is that it is not only about monitoring power consumption, it is also a tool that can be used to tweak and lower power consumption.
Installing Powertop on Proxmox
Granted, I haven’t really seen where others have installed Powertop on Proxmox, but I’m sure I’m not the first that has tried this. It was intriguing to me to learn about the tool and the potential of what it can do, especially thinking about those that want to have a hyper-efficient home lab that squeezes every ounce of efficiency out of a system.
Let’s look at installing Powertop on Proxmox. The command is simple. Add sudo if you are logged in with a non root user. However, I usually use root on Proxmox in the lab:
apt install powertop
Running Linux Powertop on Proxmox
After getting the tool installed, we can launch it by typing the command:
powertop
Once you launch it, it will display various tables, including:
- Overview
- Idle stats
- Frequency stats
- Device stats
- Tunables
- Wake up
Below you can see the Overview tab showing the power usage of various processes and hardware.
The most interesting tab for me in terms of a low power server was the Tunable tab. This tab shows you which configurations or hardware are not configured for good power efficiency with the Bad designation. These are quick wins to regain some power consumption on things like USB devices, wireless network adapters, Bluetooth, audio devices, etc.
Squeeze more power efficiency out with Powertop auto tune
Even if you have a low power server in terms of efficient hardware, there may be some quick wins to get back a little bit more power. On my Proxmox test server I am using, the Beelink SEi14 with the Intel Core Ultra 5 125H processors, I wanted to see if we can knock the power of Proxmox down even further.
The --auto-tune
parameter is a great parameter for the Linux Powertop tool to remember, as it will apply all the power-saving recommendations suggested by Powertop. On the Tunables tab you can click each one that is recommended and enable the tweak, or with the –auto-tune parameter it applies them all at once.
powertop --auto-tune
What types of tweaks will it apply? It will do things like the following:
- Enable USB autosuspend for USB devices
- Optimize CPU C-states and P-states for power saving
- Reducing wakeups from various hardware components
Below, you can see the tunables tab after running the –auto-tune parameter and all the entries show Good now.
Not persistent by default
You need to make sure to know that the --auto-tune
setting implements the changes it recommends only temporarily. If you reboot your Proxmox host, the settings will go back to defaults unless they are made permanent.
Making the settings persistent
If you want to make the settings persistent, you can create a systemd service that will run the same command during startup:
powertop --auto-tune
First, make a systemd service file:
sudo nano /etc/systemd/system/powertop.service
You can add this to that file:
[Unit]
Description=PowerTOP auto-tuning
[Service]
Type=oneshot
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target
Then, enable the service using the command:
systemctl enable powertop.service
Results on my Proxmox mini PC low power server?
You may want to know what results I was able to achieve on my low power server running Proxmox on a mini PC. The following is a shot of the power consumption before running Powertop:
Now for the results after running the Powertop utility:
- 13.5 watts, so saved 1 watt.
So, power consumption wasn’t cut in half or anything that dramatic. However, I will say that even a watt or two over the course of a year’s time will result in a noticeable difference in your power bill. So, is this worth doing? Without further testing over an extended period of time, I would say yes. It is simple to do and easy. It is a “quick win,” allowing you to reduce your power footprint with some simple software tweaks.
Things to keep in mind
You do need to keep in mind that Powertop may make some changes that cause a few issues with things like USB devices not recognizing devices when plugged in, etc. However, I think most will not be affected by the tweaks or changes made by Powertop if you are simply running your low-power server running Proxmox as a headless unit that is just running a few virtual machines in the home lab. Most are probably not going to be plugging and unplugging USB devices regularly.
Wrapping up
Powertop is definitely a really cool tool that I think has merit to use in the home lab and provides a quick win on tweaking and reducing your power consumption even further. Let me know if you guys have used it before and what other tools or tweaks you use for having the most low power server in your home lab as possible.