Understanding Memory Compression in vSphere 4.1
IntroductionvSphere 4.1 comes with a new performance-enhancing feature called memory compression. It can give your system a performance boost when it starts running low on RAM. Just like swap memory, memory compression is not equal to real memory but can help to prevent degradation of performance when you're running low on memory. For comparison, memory compression is faster than swap on disk but slower than real memory.
Where to configure Memory Compression in vSphere 4.1To start, go to your vSphere Client and select an ESX server whose memory compression settings you’d like to configure. Now, navigate to that server’s Configuration tab and, in the Software panel, click the Advanced Settings link.
In the Advanced Settings window, open the Mem set of settings by clicking that name in the left-hand-side panel. The settings we’re looking for are found near the bottom, so you’ll have to scroll down until you reach the first setting that starts with Mem.Mem.Zip.
All settings related to memory compression start with Mem.Mem.Zip. For instance, there’s Mem.Mem.ZipEnable, which allows you to Enable (set to 1) or Disable (set to 0) Memory Compression. Other memory compression settings include:
- and so on
All settings take effect after you click the OK button.
Now that you know where to make changes to the Memory Compression settings in case you really need to, let me show you where you should go to find out if those settings really need any tweaking.
How to check performance information related to Memory CompressionAgain, make sure the right ESX Server is selected, then go to that server’s Performance tab. Now, expand the drop-down list right beside the label that says Switch to: and then click Memory.
Initially, the next window won’t contain any stats regarding memory compression. You’ll have to add them first. To do that, click the link that says Chart Options. I’ve enclosed that with a yellow circle in the screenshot above.
- Compression rate
- Decompression rate, and
- Compressed (which refers to the amount of compressed memory)
After clicking the OK button, you’ll be brought back to the previous window where you’ll then see the newly added memory compression stats in the graph as well as in the Performance Chart Legend.
The graphs representing the newly added memory compression-related counters are not yet visible in the screenshot shown above. That’s because, as mentioned earlier, memory compression kicks in only during times when the system is running low on RAM.