Q: What's an appropriate memory size for a vSphere virtual machine (VM)?

A: In a recent FAQ, I reported on VMware's five best practices for memory management (as outlined in its recent document "Understanding Memory Resource Management in VMware ESX 4.1"). The fifth of those recommendations suggested that when assigning memory resources to VMs, you should "Set an appropriate memory size."

What, exactly, is that correct size? Considering all the memory management techniques at vSphere's disposal, you might find that you're getting the answer quite wrong.

Even though vSphere can handle oversubscription of memory, doing so without purpose is never a good idea. VMware's guidance suggests that, "virtual machine memory size should be slightly larger than average guest memory usage." This means that even though you can significantly oversubscribe memory (such as giving 4GB of RAM to a VM that only uses a half-gigabyte) you really shouldn't.

When VM memory is set to too high, more overhead memory must be reserved for that VM. Setting memory too high can automatically invoke the memory management techniques described in my last FAQ and in VMware's document. These activities require resources to accomplish, which could have an impact on VM performance.

For best results, use vSphere's memory counters to help you understand the actual values of each VM's memory needs. Then, adjust assigned memory so that each VM gets just enough for its needs.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.