Memory overcommitment on VMware ESXi 5.0

virtual-memoryvirtualizationvmware-esxi

I would like to understand better the possibilities of VmWare ESXi memory overcommitment. I've read this paper from VmWare, so I am familiar with general concepts, such as hypervisor swapping, memory balooning and page sharing. It seems that a combination of these techniques allows for quite a large degree of overcommitment. However, I am not sure.

I am deploying a virtual test lab comprising of 4 identical sets of virtual servers and workstations and a couple of virtual router instances. Overall, I expect to be running around 20 virtual machines with Windows XP, Windows 7 and Ubuntu for workstation hosts as well as CentOS and Windows 2008 Server instances for servers.

The problem is, however, that the host machine only has 12GB of RAM and I don't have an option to stuff in some more. I would like to know what is the best option to configure hosts in order to achieve reasonable performance within the constrains.

I have these two options:

  • Allocate as little as possible of RAM to each virtual machine.
  • Allocate an extraordinary amount (such as 4 GB per instance) and let the baloon driver do the rest.
  • Something else?

Which would work better? Machines will mostly be idle, so I don't have any major performance expectations, but they should run reasonably smoothly nevertheless.

Best Answer

More (moar) RAM is always better, if the path to obtaining it is clear. In most VMWare deployments, you'll run out of RAM far sooner than your CPU resources.

enter image description here

I'd suggest providing the lowest reasonable amount of RAM for each specific VM, making sure the VMWare tools are installed and running within each VM. This controls the balloon driver.

One way of approaching a RAM-constrained environment is to set basic resource allocation (share) rules. These only come into play when contention occurs. In the graphic below, I've lowered the "Shares" priority for several VMs and increased it for others. This allows you to control which VMs take precedence when the RAM is tight.

If you use this approach, you'll have to make decisions about the relative importance of the VMs. An application server may take precedence over a DHCP server... or an idle Windows XP instance.

enter image description here