Sunday, 3 August 2014

Memory Ballooning in Vmware

Memory Ballooning
The first thing to be clear about is that Memory Ballooning is a technique that is only engaged when the host is running low on physical memory.  If you have a host with 60 GB of physical memory available and the virtual machines are only allocated a total of 30 GB of memory, then you may never need to know what memory ballooning is all about.  However if you are over committing your hosts then this is an important topic to review.
Memory that is allocated to a virtual machine might not all be actively used.  Think about it, if 4 GB is assigned to a machine, the applications may only be using 2 GB of it actively.  As far as an ESXi host is concerned though, 4 GB of memory is basically off limits because it’s assigned it to a VM.  VMware ballooning basically consists of the host asking for some of that memory back.
Remember that one of the things we like most about virtualization is that the host doesn't know what the guest OS is doing.  At the same time, the guest OS doesn't realize that it’s running inside of a virtual machine either.  In order for the host to request memory back from the guest OS it needs to use the balloon driver (vmmemctl.sys) to communicate this information.

When the ESXi host runs low on memory it uses the balloon driver to determine what memory the virtual machines can give up to prevent the host from paging to disk.

No comments:

Post a Comment