- Memory Swapped: The amount of memory reclaimed by swapping (this is host swapping, not the guest operating system).
- Memory Ballooned: The amount of memory that is reclaimed by ballooning.
There will be little or no ballooning or swapping in an environment that is well run and has enough memory for all the virtual machines. The balloon driver only goes into action if there is not enough memory for the virtual machine or if the guest has a limit set and is not getting enough memory. You will see large memory consumed percentages and then see the balloon and swapping starting in this case. I have also seen high ballooning and swapping when a VM has a limit set and the guest needs tries to use more memory than is available to it. All of this only happens if VMtools are installed because vmmemctl using this agent to communicate with the guest OS to determine which memory to swap out.
The solutions to resolving memory ballooning and swapping are usually straightforward.
- You should remove the limit if there and enough memory is available on the host or resource pool to satisfy the allocated memory.
- Add more memory to the host or resource pool if no limit has been set.
- Move other virtual machines to free up memory on the host or cluster.
- Analyze how much memory has been allocated to each guest and compare this to how much memory is used over a week or 10 day period. This will show you any virtual machines that have been over allocated for memory. You can re-size them to have the right amount of memory and use the memory you have freed up on other virtual machines.
- Power off virtual machines that are not needed.
Check back on this blog or follow us on Twitter for the next post in this series!
Part 1 of this series is: Managing Memory in VMware (Part 1 of 4)
Part 2 of this series is: Managing Memory in VMware (Part 2 of 4)
