Tactics to minimize VM power consumption

Tracking and managing VM resource consumption can help administrators save power by allowing them to shut down unnecessary hosts.

With energy prices on the rise, there has been a lot of discussion lately about how data center power consumption can be reduced. Thankfully, VMware and Microsoft both offer mechanisms to reduce power consumption for virtualization hosts.

Microsoft and VMware take very similar approaches to VM power management. Both approaches are based on some of the most fundamental concepts of server virtualization.

Although a single hypervisor is perfectly capable of running multiple virtual machines, standalone hypervisors are almost never used in production environments. Administrators simply cannot risk the hypervisor becoming a single point of failure. Therefore, most hypervisors, such as VMware ESXi and Microsoft Hyper-V, are grouped into clusters. That way, if a hypervisor were to fail, then other hypervisors within the cluster can continue to run the VMs from the failed cluster node.

Dynamic and manual VM mobility

Another concept that comes into play is that of VM mobility. In both Hyper-V and VMware environments, VMs are portable. As previously mentioned, a running VM can be dynamically moved to a different cluster node in the event of a failure. However, an administrator can also use a technology, such as vMotion or Live Migration, to manually move a running VM from one host server to another.

Administrators have a number of different reasons for manually moving a running VM to a different host. Sometimes a VM may be moved because the host needs to be taken offline for maintenance. In other cases, an administrator may move a VM because he believes that it will perform better on another host that has more available hardware resources.

Microsoft and VMware have both created load balancers that can be used to automatically migrate running VMs to different hosts so that hardware resources can be used in a way that will allow the VMs to run as efficiently as possible. Essentially, the VMs are distributed across the available hosts. However, this same concept can be reversed to save power. Rather than spreading the VMs out across all available host servers, the workload can be consolidated onto the fewest host servers possible so that unused host servers can be taken offline in an effort to reduce power consumption.

Power management in a hypervisor

Of course, in the real world, things aren't quite this simple. In a hypervisor cluster, there are a minimum number of nodes that have to be kept online in order for the cluster to remain functional. Furthermore, the cluster needs to have at least some additional capacity available so that it can continue to protect against hypervisor-level failures. As such, there are rules in place requiring a minimum number of nodes that must be kept online in order for VM power-saving features to be used. In a Microsoft environment, for example, a minimum of five cluster nodes must remain online (although the required number of nodes is reduced to four if the cluster was created using System Center Virtual Machine Manager).

The last piece of the puzzle is the server hardware must support remote shutdown and remote start up. In the case of Hyper-V cluster nodes, for example, the servers must support out-of-band management by way of a baseboard management controller.

Microsoft implements load balancing and VM power consumption management by way of the Dynamic Optimization and Power Optimization features that are found in SCVMM -- which is an add-on product not included with Hyper-V. VMware provides load balancing and power management capabilities through the Distributed Resource Scheduler, which is a part of vSphere.

Although power management is largely based on shutting down cluster nodes, there are other ways to reduce power consumption. In most data centers there are probably some VMs that can be safely shut down. For example, an organization probably doesn’t need 15 redundant domain controllers running all night long while nobody is in the office. Through careful planning, an administrator may be able to identify redundant VMs and schedule those VMs to shut down at the end of the work day. Of course, the VMs can always be brought back online in the morning via a scheduled process. This may allow even more cluster nodes to be powered down.

Next Steps

How virtualization management tools help reduce server power consumption

Calculating power savings from virtualization

Dig Deeper on Green data center: Reducing power consumption with virtualization