High energy. Your love is lifting me...

bartplessers

New Member
Feb 15, 2023
10
0
1
Hi everyone,

I'm running proxmox PVE on a Dell desktop PC
4 x Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (1 Socket)


On the host
- there are 2 virtual machines running : homeassistant (linux) and a windows 10
- the host, and virtual machines are running on a M.2 NVMe drive
- there is an internal sata disk (spinning platters) physically attached to the host and linked to the virtual windows 10 machine

Power usage of the proxmox is +/- 35W continuous.
2023-08-16_16-17-16.png

If I install a Windows 10 directly on the same physical machine, my windows can go in energy-saving mode and consumes +/- 20W. Also, the sata disk goes standby if no activity detected.

So question:
- is there an "energy save" modus for the host?
- is it possible to spin down the sata disk when attached to a virtual host with no activity on it?


kind regards,
Bart
 
- is there an "energy save" modus for the host?

You can change the CPU governor for your CPU. The governor determines the frequency at which the CPU runs. By default, you probably are using the 'performance' governor.

To see the available governors:
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

To check which governor is currently active:
Code:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

To set the governor, e.g. to powersave, you can use the following command:

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

Note that this is not persisted after a reboot, so you might have to set up a systemd unit/cronjob (@reboot)/etc. for it.
To automate this using a cronjob, you could crontab -e and insert
Code:
 @reboot echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
 
thanx @Lukas Wagner for this extensive documentation!
I modified my governors to "powersave", but unfortunately this does not have much influence on the power consumption:
(1) virtual machine (Windows 10) running
(2) virtual machine shutdown
(3) governors --> powersave

Do you have other suggestions?
Is there a way to check if the attached sata disk is still spinning? It is not in use anymore by any of the virtual machines now
2023-08-17_13-17-06.png
 
Is there a way to check if the attached sata disk is still spinning?
You can do that with smartctl -i -n standby /dev/YourDisk.

But my guess would be, that the disk won't spin down, as PVE is accessing all storages every few seconds to check if the storage is still available.
Maybe it is working when using disk passthrough while the VM is stopped, as then the disk wouldn't be used by PVE as a storage.

You might also want to edit your hdparm.conf to define a APM that allows the disk to spindown and set a spindown time for your disk.
 
Last edited:
  • Like
Reactions: bartplessers
You could also try undervolting the CPU in order to save some power
 
Hi,

This worked for me: spinning down the sda disk with

Code:
hdparm -Y /dev/sda

(1) virtual machine (Windows 10) running
(2) virtual machine shutdown
(3) governors --> powersave
(4) disk spindown
2023-08-17_14-47-22.png
Power consumption: went from 30W to 26W
This is approx the same as if I would have installed a Windows 10 machine directly on the box (+/- 24W)

Conclusion:
proxmox consumes the same power as a Windows 10 machine on the same box
However:
With proxmox you can run multiple (windows 10) machines on that box with only +/- 5W/machine and has much more flexibility!

But...:
For some reason: running a virtual Win10 on proxmox does NOT spin down physical attached disks. For some reason, Windows powermanagement (spinning down a sda disk) does not work when running Windows 10 in a proxmox VM.

Should I start a new thread for this?

grtz
Bart Plessers
 
Last edited:
Without PCI passthrough a VM is only working with virtual hardware. Even when using disk passthrough the VM isn`t seeing the real physical disk. Without managing the real disk Windows can't spin it down.
 
Even when using disk passthrough the VM isn`t seeing the real physical disk. without managing the real disk Windows can't spin it down.
Ok, this is the case in my setup.
I was hoping that QEMU Guest Agent would have this capability...

So running my "NAS" (windows 10 machine with 4TB disk) is not a good idea in a virtual environment. The power usage is not a big deal, but the always spinning disk is. It will greatly shorten the life of my disk... :-(
 
Last edited:
So running my "NAS" (windows 10 machine with 4TB disk) is not a good idea in a virtual environment. The power usage is not a big deal, but the always spinning disk is. It will greatly shorten the life of my disk... :-(
That is debatable. I personally disabled spindown so it is spinning 24/7 as spinning up and down all the time and parking heads also causes a lot of mechanical wear. Like an engine of a car that is working harder when driving downtown and always accelerating and breaking at each red traffic light while keeping a constant speed on the highway is less stressful. Both will cause wear, but the one is stressing parts less but over a longer time and the other one is heavily stressing the parts but only for a short time.
 
Last edited:
Hi everyone,

I'm running proxmox PVE on a Dell desktop PC
4 x Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (1 Socket)


kind regards,
Bart

Hi Bart,
What are you using to monitor your power consumption on this? Interested for myself!
I'm guessing you're running something like an Optiplex 7050 (like me) and have always wondered how much power it's consuming. My home energy meter suggests < 30W (observing difference between PC on and PC off, not very scientific) which I'm happy with. I've got a single M.2 disk and a pair of enterprise Intel SSDs, and I've unplugged the CD-ROM drive. I also swapped out the i5 for an i7-7700, to which I've applied the "powersave" scaling governor.

Without this becoming an interminable debate about the climate and cost of energy, I believe the power difference between a single disk spinning and hibernating is of the order of 3-4 watts, which to me is negligible. Reducing your time in the shower (9kW electric) by ~20 seconds would have a bigger difference, for example than having it spin down for 50% of the day. I could easily justify that by offsetting my own energy consumption elsewhere.
 

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!