In a virtual environment, memory is often considered the most constrained resource. The hypervisors use several techniques to optimize memory usage. Among the techniques to manage memory there is over commitment, which improves utilization, but can lead to other issues, if not managed properly.
What is Memory Over-Commitment?
Memory Over-Commitment is a feature that allows a hypervisor to provide more memory than the physical host actually has. For example, if the host server has 4 GB of physical memory available, you can provision 4 virtual guest machines, each with 2 GB of memory allocated. Usually, this is harmless, as most virtual machines only use a portion of their allocated memory. Indeed a Virtual Machine with 2 GB of memory allocated might only use 500MB, so if all four machines have similar usage patterns, you will still have 2 GB of memory left over on the physical host.
Sometimes, a few VMs might consume all (or even more) of their allocated memory. In this case the host can run low on memory. So, the hypervisor can identify and reallocate unused memory from other VM’s, using a technique called memory ballooning.
What is memory ballooning
Virtual memory ballooning is a memory reclamation technique used by a hypervisor, when it runs low on RAM memory, to allow the physical host system to retrieve unused memory from some guest virtual machines (VMs) and share it with others mainly.
Virtualization comes with some key benefits. One of them is virtual machines isolation, which is very useful for security and risk management. A drawback of virtual machines isolation is that the guest operating system is not aware that it is running inside a virtual machine and is not aware of the states of other virtual machines on the same host. When the hypervisor runs multiple virtual machines and the total amount of the free host memory gets low, none of the virtual machines will release guest physical memory since the guest operating system cannot detect the host’s memory shortage.
Why we made Smart Ballooning
Smart Ballooning is a solution designed by Eco4Cloud for virtual machines memory management for the VMware virtualization platform. Smart Ballooning enables the release of memory which is actually not used by VMs and make it available to ESX, which will possibly allocate it to other VMs in demand. The solution has been developed leveraging the native memory ballooning mechanism, and consists of a series of tasks that – under specific conditions – force the platform to activate the memory ballooning selectively, i.e., only on the virtual machines where this memory reclamation technique is most productive, and with no impact on performance.
Eco4Cloud Smart Ballooning allows to automatically release memory from the virtual machines meeting specific conditions, releasing the unused RAM memory, and making it available for further virtual machines. Field results show that over 15% of RAM memory can be gained back, with full transparency for the virtual machines. Since memory is the most typical bottleneck resource in virtualized environment, this can lead to significant CapEx avoidance/deferral. Smart Ballooning prevents performance degradation due to memory ballooning hitting an entire ESX host, by proactively ballooning only overcommitted VMs. In fact too much Ballooning might manifest as high Disk I/O or latency and applications on host can suffer performances degradation.