Cloud Operations Industry Expert vCenter Operations vRealize Operations

David Davis on vCenter Operations – Post #9 – Right-Sizing Virtual Machines with vC Ops

In my last article in this series, Understanding vCenter Operations Badges, I covered one of the most important things that you need to know to use vC Ops – the vC Ops Badge system. It only takes a few minutes to understand how the badges work and, once you do, you’ll be able to quickly tell if any piece of your vSphere infrastructure has a problem, or if everything is running great.

In this post, I’ll cover the first thing that new vC Ops admins take advantage of as soon as they install vC Ops – “right sizing” virtual machines.

If you aren’t familiar with the term, the quick explanation is that, when you create a VM, you have the option to select the number of vCPUs, the amount of vRAM, and the size of the vDisk. In most cases, it’s impossible to predict what those values should be with 100% accuracy and the virtual machine is not sized optimally. Either there are too many vCPUs allocated, too few vCPUs, to much vRAM, too little vRAM, or the vDisk is too large (rarely do we make it too small). Even if we are lucky enough to size the VM 100% correctly when it is first created, over time, the application usage and application data inside the VM will either be used less or more than you had thought. In other words, “things change”, especially over time.

Trying to “right size” virtual machines to the optimal amount of virtual resources is tough to do, manually. You can try to use vCenter to do it but, even if you are able to do it for a single virtual machine, repeating that process for every virtual machine in your infrastructure is time consuming and prone to error. Finally, repeating that process every week, month, or quarter, for every virtual machine in your virtual infrastructure is painful and completely inefficient with tools available to automate it.

Thankfully, vCenter Operations Manager automatically analyzes all of your virtual machines, on a real-time basis, and that analysis is immediately available to you when you look at the vC Ops Dashboard.

How to Tell if your VM is NOT “Right-Sized”

When a VM is NOT “right-sized”, it could be either “too big” or “too small”. The goal with right-sizing is to get to the “goldilocks” VM size where the VM is sized “just right”.

vcops-low-efficiencyIf a VM is undersized (too small and with too few resources) then it’s likely you will see an indication of an undersized VM from a red Health badge with a low value. This is telling you that the VM does not have the resources that its applications require.

Another indicator of an undersized VM might be that that your Workload badge is reporting a high workload value and is red or yellow in color. In fact, it may even be displaying some faults due to the VM being so undersized.

A third indicator (using the middle column on the dashboard) of an undersized VM is that the Risk badge may be red and reporting a high risk value. Finally, the Time Remaining sub-badge might show that you have very little time remaining with the current amount of resources you have allocated to that VM.

Now, what if the VM is not “too small” but, on the contrary, too big?

You will learn about your VMs that are too big, or oversized, in general by looking at the the Efficiency badge and associated score. A low efficiency score will indicate to you that VMs are oversized (as will a red badge).

The second, more specific, indicator is going to be reclaimable waste badge. If vC Ops says that you have waste that can be reclaimed, it is going to come from your over-sized VMs. The reclaimable waste pane, under the efficiency badge is going to identify for you the CPU, memory, and disk resources that are going unused. To get a list of the virtual machines, to go the the Views tab and select the Undersized Virtual Machines – List view.

**How to “Right-Size” your VMs

Once you know what VMs you want to “right-size”, which need to have more resources, and which need to have fewer resources, it’s time to “right-size” them. So how do you go about it?

Today, there is no button to push in vC Ops to automate the right sizing. You must identify which VMs need to have their resources configured and then estimate what the new resources values, for vCPU, vRAM, and vDisk, need to be.

In the case of virtual disk, of course, you have two aspects to consider – I/O throughput and capacity. Adding additional disk capacity is easy to do. a vDisk can be expanded and you can dynamically extend the, let’s say, Windows OS to take advantage of it. Shrinking a Windows partition, especially a boot disk, is more complex. When it comes to a lack disk I/O throughput (which you’ll usually see in terms of high I/O latency), this is usually achieved by moving the virtual machine to another vSphere datastore that has more I/O capacity (something that can be automated using VMware’s vSphere Storage Distributed Resource Scheduler (SDRS).

Measuring the Results of “Right-Sizing”

vcops-high-efficiencyOnce you have taken the action necessary to right-size your virtual machines, you should re-analyze them to ensure that the action you took was successful. As vC Operations Manager is continually learning about your environment, all you need to do is to shutdown a VM, resize it, and power it back up so that vC ops can learn about the new configuration.

From there, you can check on your over-sized VMs by looking at your efficiency score as well a reclaimable waste. For VMs that were undersized and needed more resources, you can check their health score as well as your new time remaining scores.


Leave a Reply

Your email address will not be published. Required fields are marked *