Post navigation

VM Right Sizing – An example of the benefits

I thought this example may be useful to show the benefits of Right sizing a virtual machine.

The VM is an SQL Database server with 4 vCPUs on a cluster which is highly overcommitted with lots of oversized VMs.

As we can see by the below graph, the CPU ready was more or less averaging 10% and on the 24th of July most vCPUs spiked to greater than 30% CPU ready each. ie: 30% of the time the server is waiting to be scheduled onto the pCPU cores.

The performance of applications using databases hosted on the server were suffering serious issues during this time.

On the 24th the VM was dropped from 4 vCPUs, down to 2 vCPUs and the results are obvious.

CPU ready dropped immediately (even in a heavily over-committed environment) to around 1% and CPU utilization remained at around the same levels. Performance also improved for applications (for example vCenter) using the database server.

TIP: Right Sizing not only helps the VM you right size, but it helps relieve the contention on the ESXi host (and cluster), which will improve performance for all VMs.

It is also important to point out this VM is the first VM to be right sized, so as more VMs are right sized in the cluster, Ready time will drop further and performance will continue to improve.

This also results in opportunities for greater consolidation within the environment without compromising performance or redundancy.

I would like to point out that I believe this server may benefit from 4 vCPUs, but definitely not in this highly CPU contended environment.

As more virtual machines are Right Sized, then this environment would likely have the opportunity to consider increasing vCPUs in suitable VMs after monitoring performance for a suitable period of time. Products like VMware vCenter Operations is excellent for reporting on Oversized and undersized VMs.

Great post Josh. Right sizing is critical to get best performance. I’d be interested to know what type of CPU’s are on the physical hosts and how many cores per socket you have. Putting a 4 vCPU VM on a 6 core socket is not optimal and can result in higher ready time than you might expect. Just changing the 4 vCPU to 3 vCPU’s can make a big difference.

The best practice guidance is to have vCPU configurations that can easily divide into the pCPU Cores Per Socket (e.g. 1,2,3,6 on 6 Core per Sockets). This gives the best opportunity to get the VM’s scheduled on a physical core. When HT is available some workloads will also benefit from using the PreferHT advanced option to keep CPU cache coherency. Sizing within a NUMA node is also important for CPU’s as well as memory, unless you’re using vNUMA in vSphere 5.