Matt Ray

Rightsizing Virtual Workloads

Blog Post created by Matt Ray Expert on Mar 23, 2015

Virtualization has brought an immense amount of flexibility to IT in terms of being able to quickly provision workloads and allocate resources. Another, great benefit is the ability to oversubscribe resources at the host level in order to fit more VMs per physical host. But, this benefit comes with its own set of risks to VM performance on the compute layer.

As we often talk about at VMTurbo these risks can be substantially mitigated by appropriately managing workloads from a placement, capacity, and sizing standpoint. Today, I want to take a little bit closer look into some of the performance risks associated with over provisioning workloads specifically in terms of CPU and memory allocation.


Over Provisioning CPU

The most immediate risk to performance that I see in customer environments comes from over provisioning of vCPU. This risk stems from the way that hypervisors schedule CPU time once the host has become over allocated.

When a VM needs processor time it must wait for the host to have available CPU cores to process. The number that must be available is equal to the number of vCPUs assigned to the VM. This wait time results in degradation of performance for not only the VM experiencing the wait time but every other VM on the host.

Because of this phenomenon, administrators often end up trying to follow best practices for over allocation of CPU resources, although it is impossible to manage the environment based on rule of thumb. One of the best ways to reduce the amount of CPU ready time in an environment is actually to right size the VMs within the environment to the appropriate number of vCPUs. This has two benefits:

  1. The VM being rightsized now has less CPUs that must clear before it can get processor time.
  2. The other VMs on the host now have less competing processors.

Aside from a pure performance play this type of rightsizing also helps to increase overall host densities.


Over Provisioning Memory

Performance degradation associated with over provisioning of memory is a little less clear cut. There is a small overhead associated with additional memory associated with a VM, but it is oftentimes a negligible hit to performance. The real performance hit comes in the risk associated with over allocation of resources and the ability to guarantee performance of dynamic workloads.

The first problem we see commonly as administers is ballooning. I want to start by pointing out that ballooning isn’t ALWAYS a bad thing. The feature exists because it prevents the host from moving to a swap state, and is very beneficial in that regard.

The problem with ballooning comes in when you start looking at how fast the host can respond to changes in resource demand. The balloon driver takes time to initiate, meaning that if a host is relying on balloon drivers to adequately deliver memory to other VMs you will experience slowness not associated with typical memory access. It also takes time for the balloon driver to deflate, meaning that if the VM balloon driver is inflated and the VM needs more memory slowness will occur.

Often times to prevent these problems ballooning is turned off, or reservations are set on the VMs. These types of constraints introduce their own issues, the biggest one being the potential for swapping on the host leading to performance degradation of multiple VMs on the host.


How VMTurbo helps

VMTurbo manages resource allocation across the entire environment including sizing, placement, and capacity. Reclaiming resources within an environment can be a beneficial activity in order to mitigate the performance risks mentioned above. But, managing reclamation of resources independent of provisioning of additional resources or proper placement of workloads will only increase risk within the environment.

By continuously driving your environment to its healthiest state VMTurbo is the only solution that is able to safely decrease overall risk within the virtualized environment.