One of the advantages which virtualization brought with itself was “POWER SAVINGS” as it enabled administrators to consolidate workloads on fewer number of physical servers and thus save some power and reduce carbon footprint in the datacenter. Sunny Dua rightly mentioned in his blog that “Even before you start realizing the other benefits of virtualization, power bills is the first Opex savings which makes that return on investment on virtualization speak for itself”
Esxi can take advantage of several power management features that the host hardware provides to adjust the trade-off between performance and power use. One obvious question that comes in mind that if I can save more power by using the BIOS features and the hypervisor features to throttle down the CPU frequency, then why should not I go for it?
The answer for this is “selecting a high-performance policy provides more absolute performance, but at lower efficiency (performance per watt). Lower-power policies provide less absolute performance, but at higher efficiency”
Esxi host provides five power management policies and uses “Balanced” policy by default. To change the power management settings login to vSphere Web Client and navigate to Host > Manage > Settings > Power Management > Edit
You can chose one of the 5 policies as mentioned below:
- Not supported: The host does not support any power management features or power management is not enabled in the BIOS.
- High Performance: The VMkernel detects certain power management features, but will not use them unless the BIOS requests them for power capping or thermal events.
- Balanced: The VMkernel uses the available power management features conservatively to reduce host energy consumption with minimal compromise to performance.
- Low Power: The VMkernel aggressively uses available power management features to reduce host energy consumption at the risk of lower performance.
- Custom: The VMkernel bases its power management policy on the values of several advanced configuration parameters. You can set these parameters in the vSphere Web Client Advanced Settings dialog box.
When a CPU runs at lower frequency, it can also run at lower voltage, which saves power. This type of power management is typically called Dynamic Voltage and Frequency Scaling (DVFS). ESXi attempts to adjust CPU frequencies so that virtual machine performance is not affected.
When a CPU is idle, ESXi can apply deep halt states, also known as C-states. The deeper the C-state, the less power the CPU uses, but it also takes longer for the CPU to start running again. When a CPU becomes idle, ESXi applies an algorithm to predict the idle state duration and chooses an appropriate C-state to enter. In power management policies that do not use deep C-states, ESXi uses only the shallowest halt state for idle CPUs, C1.
To set the power management policy to custom, please refer this article by VMware. Also Rebecca Grider wrote an excellent blog to demonstrate the use of different power management policy and its impact on performance.
Setting power management policy via esxcli
esxcli system settings advanced set –option=/Power/CpuPolicy –string-value=”High Performance”
Power management policy ca also be set via Powercli. Instructions are here
Additional Reading
Configuring ESXi Power Management Policy Using the CLI
ESXi host performance vs. power consumption
Performance over Power : Make the right choice.
I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂