VMware's memory management technologies (collectively called memory overcommit) has included these features: transparent page sharing, balloon driver, and hypervisor swapping. With vSphere 4.1, a new category is introduced in the form of memory compression.
Memory compression is an incremental improvement in the most constrained resource in virtual environments today; it is not a cure-all for memory intensive virtual workloads. In the course of my virtualization journey, I've added memory to hosts more frequently than processors (in the form of an additional host) or network connectivity; this is usually due to workloads restating their requirements midway through their lifecycle. (As a general rule, workloads are allowed to restate the memory requirements, and I'd rather deal with that instead of a large initial overprovisioning.)
The memory compression feature is designed to limit the amount of memory that goes through the slowest process of a hypervisor swap. When memory compression is used, the number of swap-in and swap-out the swap file (on disk) will be reduced. Another way of looking at this is by compressing selected memory pages — the transfer is still occurring in ESXi host RAM with the minimal overhead of the compression and decompression algorithm (in favor of going in and out of disk uncompressed). For more information, read section 3.5 of VMware's Memory Management white paper (PDF) to learn how it is designed to optimize memory in virtual environments.
In the day-to-day operation of a vSphere environment, you can see if this new feature is being used on a given virtual machine. On the Performance tab, a new memory chart is available on the Resource Allocation tab. Figure A shows a virtual machine that has 20.61 MB of memory going through the compression algorithm.
Click the image to enlarge.
Aside from the new compressed memory category, the other memory categories are enumerated for the virtual machine. The virtual machine in Figure A does not have VMware Tools installed, and that is why there are 0 MB of RAM allocated to the ballooned category. This is a test lab that was set to push the virtual machine into swap and compression by design, but all virtual machines should have VMware Tools installed to optimize performance and experience.
Is memory compression an attractive incremental feature for your virtual environment? Let us know in the discussion.
Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.