Memory Balloning
When ESXi host memory is overcommitted and scarce, ESXi may force a guest operating system to relinquish some of its memory so that it can be used by other virtual machines. This is accomplished in the guest operating system by using the VMware Tools-installed vmmemctl driver to force memory pages to the guest operating system’s page file or swap partition. Any memory pages freed by moving their content to disk are then given to other virtual machines by the VMkernel. ESXi minimizes the performance impact by allowing the operating system to choose which pages get moved to disk. The vmmemctl driver is often referred to as the balloon driver because a balloon illustrates the way it operates.
When there is ample memory,the balloon remains uninflated.
But when memory becomes scarce, the VMkernel chooses a virtual machine and inflates its balloon; that is, it tells the balloon driver in that virtual machine to demand memory from the guest operating system. The guest operating system complies by yielding memory and the VMkernel assigns the relinquished pages to other virtual machines.
To deflate the balloon, the balloon driver relinquishes the memory, and the VMkernel grants the memory back to the guest operating system.
VMware Tools must be installed in the virtual machine for memory ballooning to function.