5 Things to Consider When Assessing Your VM Density

Ariel image of crowded buildings in a city.
High density!
SOURCE: Flickr

Businesses try to get the most out of any capital expenditure to improve their bottom line. When it comes to virtualization, this means trying to get the highest possible return on their virtualization hardware investment. You can do this by increasing the number of virtual machines (VMs) hosted. The greater the number of VMs, the lower the per VM hardware cost. This is what VM density means. Sounds great, right? Not if you add too many VMs to a finite infrastructure with limited resources. 

Excessively high VM density can result in problems with performance, stability, and workload availability. In this article, I’ll walk you through the 5 key factors to consider when optimizing your VM density. After discussing P2V ratios, I’ll tell you more about hypervisor overheads. I’ll then discuss overloading clusters and peak demand spikes. Let’s get started! 

5 Considerations To Optimize VM Density

Here are the 5 things you must keep in mind when deciding whether or not to increase your VM density. First, let’s start with performance-to-value (P2V) ratios!

1. P2V Ratios Aren’t Reliable

An optimized P2V or VM density value doesn’t exist for VM server optimization. Server workloads tend to be far less standard compared to desktop virtualization. This makes it harder to predict how many server workloads a particular virtualization host can handle. You might have a mail server, database server, and web server, all on the same host. Each of these servers has unique performance requirements and resource usage characteristics. This makes it nearly impossible to guarantee that the host can accommodate a specific number of VMs. 

Essentially, VM density is determined by the hardware’s capabilities and the types of workloads your VMs have to support. That said, running the hypervisor also needs some overhead resources. This is the abstraction layer used between VMs and the underlying hardware. 

Let’s now turn our attention to the hypervisor’s overheads.

2. Hypervisor Overheads Need Memory Storage Too

It’s crucial to remember the hypervisor if you’re trying to figure out how many VMs your host can handle. In essence, you must remember that some of the host server’s hardware resources are allocated to the hypervisor.

Suppose you plan on hosting your VMs on a Hyper-V server with Desktop Experience installed. According to Microsoft, the operating system will need at least 2 GB of RAM. Without Desktop Experience, the required RAM amount decreases to 512 MB. Moreover, the host operating system needs at least some memory. 

In short, no matter the virtualization software installed, the host will require memory, CPU, disk, and network resources. VMs can’t use these resources.

Screenshot of Task Manager.
8 GB of the memory that is currently reported as being in use is being consumed by the host OS.

Now that you know about overhead requirements, you need to know what happens if you don’t provide your VMs with enough resources. Knowing this will help you spot issues as you create your own VM solutions.

3. Limited VM Resources Cause Performance Problems

Every operating system and application requires hardware resources to function correctly. Software vendors publish a list of minimum hardware requirements precisely for this reason. The listed requirements don’t go away simply because of the software running on your VM.

It’s sometimes possible to skimp on the resources allocated to a virtual machine — I do this fairly often in lab environments. If a server isn’t supporting a user load, it likely won’t need as much memory. But in a production environment, short-handing virtual machine resources to the point that the VM lacks minimum defined hardware resources causes problems.

Limited VM resources can hamper performance and stability. For example, if your virtual machine does not have enough memory, it can start using a paging file to compensate for the memory shortage. However, the paging process is far slower than memory access and can harm the VM’s performance.

Screenshot of the Performance Options window.
Although its job has changed a bit over the years, Windows can use a page file to make up for shortages in system RAM.

Another change is related to  VM overloading in cluster environments. Take a look at these with me next.

4. Cluster Overloading Hinders Capacity

In the real world, most production virtualization hosts are part of a failover cluster. To this end, you should consider VM density in terms of the cluster as a whole. This contrasts examining VM density solely from the standpoint of individual hosts within the cluster.

It’s vital not to achieve high VM densities on individual nodes in clustered environments. If your cluster can function with two failed nodes, the other nodes must have enough capacity to pick up the slack.

You’ll also find that over time, demand for capacity spikes. As the administrator, you must provide enough capacity to manage these needs!

5. Demand Spikes in VM Density Are Bound to Happen

When optimizing your VM density, leave some capacity on your hosts to accommodate demand spikes. If you only allocate the resources required to cater to routine needs, then demand spikes will cause challenges. Insufficient resource allocation will negatively impact performance.

Final Thoughts

Over-provisioning virtual machines can waste hardware resources. Yet provisioning VMs can cause problems with performance, stability, and availability. Thus, avoid assigning heavy workloads to the bare minimum hardware resources. Remember that the ideal P2V or VM density target doesn’t exist. Instead, you should provide sufficient capacity for your hypervisor to run effectively. Additionally, don’t limit resources below the minimum software requirements. Ensure your cluster nodes have ample capacity to pick up for failed nodes.

Do you have more questions about VM density or dynamic memory? Check out the FAQ and Resource sections below!

FAQ

What is the best way to identify the hardware resources a virtual machine needs?

The best option is to use a performance monitor to watch how the VM uses its available resources. Based on these reports, you can then adjust CPU and memory allocations up or down.

Is dynamic memory a good solution for dealing with demand spikes?

Dynamic memory is used when a workload requires more memory to boot than to run. It can also be used to automatically add extra memory to a workload in the event of a demand spike. That said, dynamic memory can only increase if the host has memory available for the VM.

What happens if you try to allocate all of a host’s memory to VMs and do not leave any memory for the hypervisor itself?

Allocating excessive memory to VMs would typically work for a little while, but stability problems eventually occur. Today, most modern hypervisors prevent you from allocating memory that the hypervisor needs for itself.

What types of events can cause a workload demand spike?

Demand spike causes vary based on the type of workload. If a VM acts as a domain controller, a demand spike might occur when everyone logs in at once. If you are running an e-commerce site, a demand spike can occur during a sale or before national holidays.

What happens if you allocate more hardware resources to your VMs than they need?

Allocating excessive resources to VMs is known as over-provisioning. The main consequence of over-provisioning is that resources allocated to a VM are unavailable for use elsewhere. Hence, over-provisioning decreases a host’s potential VM density.

Resources

TechGenix: Article on Configuring Dynamic Memory

Learn how to use PowerShell to configure dynamic memory.

TechGenix: Article on Dynamic Memory Buffer Settings

Read more on dynamic memory buffer settings.

TechGenix: Article on Dynamic Memory

Learn how dynamic memory works.

TechGenix: Article on Create Failover Clusters

Read more about how to create failover clusters.

TechGenix: Article on Hyper-V Guest Cluster

Learn how to create a Hyper-V guest cluster

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top