How Many Virtual Machines on a Dynamic Memory Host?

I’ve seen people asking what the VM capacity of a Hyper-V host would be with dynamic memory enabled on the virtual machines.  Well … that depends.

I can visualise virtual machines being configured in 3 ways:

  1. Disabled: That means virtual machines will be set up with static memory.  You configure the VM with 2 GB of RAM and it will consume 2 GB of RAM … plus up to 32 MB of overhead for the 1st 1 GB and up to 8 MB overhead RAM for each additional GB after that.  I can see this being used where users of VM’s (for billing reasons) or applications (for specification verification reasons) expect to see the full allocation of RAM.
  2. Optimized: You will set up the start up RAM setting to be the minimum required for the virtual machine’s guest operating system (and I recommend including the amount required for normal operations) and the maximum RAM to be what is required to deal with peak usage.  For example, a W2008 R2 web server might be set up to boot up with 2 GB start up RAM and with 4 GB maximum RAM.  This will probably be the most common configuration.
  3. Maximized: I think this will be a niche configuration.  In this scenario the virtual machine is set up with a start up RAM setting as with the optimized approach.  However, the maximum RAM setting will be set up to be the maximum that a virtual machine or the host can support.  For example, a 32 GB host can realistically support a virtual machine with 29 GB RAM.  And remember that a Hyper-V virtual machine can support up to 64 GB RAM.  This is a more elastic computing approach where you need to ensure that virtual machines can get as much memory as they need.  Just be wary that some applications will eat up whatever you supply either because of memory leaks or bad development practices.

The disabled approach is pretty easy to calculate.  Just use my previously shared spreadsheet.  My rule of thumb is take the physical memory of the host, subtract 3 GB RAM and what remains is what you typically have for virtual machines.  You’ll want to allow for more than 3 GB on huge hosts.

It gets a little more difficult with Dynamic Memory enabled.  To be honest, I think it’s going to be a hell of a lot more difficult to size hardware or determine host capacity.  Just how do you know how much memory is required for virtual machines with a variable amount of memory if you don’t already have them to monitor?  You can use the performance metrics results of a MAP (or other) assessment (you should always do an assessment at the start of your Hyper-V project) to figure out the average memory utilisation of the machines that you are going to convert into Hyper-V virtual machines.  Sum up the averages, maybe add a percentage and bingo; that will give you an idea of how to size the RAM of your host hardware.

It gets even more complicated if you mix your virtual machine configuration types.  Some might be set up with static memory, some with Dynamic Memory set up in what I’ve called optimized and/or maximized configurations.  Calculating the host capacity is now going to be very complicated.  You’re getting into spreadsheet country.

Please follow and like us:

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.