Vmware Video demo about Memory compression.
By using memory compression, feature which is enabled by default in vSphere 4.1 you can speed access up to 1000 times….because the compression/decompression is much faster than swapping to disk.
In the video you'll see a simple test where the memory compression will be deactivated on the first ESX host (in advanced options) and the other ESX host runs with the feature enabled.
A quick quote from Understanding Memory Resource Management in VMware ESX 4.1 (PDF)
The idea of memory compression is very straightforward: if the swapped out pages can be compressed and stored in a ompression cache located in the main memory, the next access to the page only causes a page decompression which can be an order of magnitude faster than the disk access. With memory compression, only a few uncompressible pages need to be swapped out if the compression cache is not full. This means the number of future synchronous swap-in operations will be reduced.
Hence, it may improve application performance significantly when the host is in heavy memory pressure. In ESX 4.1, only the swap candidate pages will be compressed. This means ESX will not pro-actively compress guest pages when host swapping is not necessary. In other words, memory compression does not affect workload performance when host memory is undercommitted.
As you'll see the VM where the memory compression is enabled starts swapping it's memory straight away, but the other VM swaps only small amount of it's memory so the performance is still acceptable.
Memory compression is a new feature in VMware vSphere 4.1.
Enjoy the video bellow…. -:)
Source: VMware TV