Q. How long does it take for VMware Transparent Page Sharing (TPS) to find all duplicate pages of memory for a virtual machine (VM)?
August 2, 2009
A. TPS, used by VMware, works by creating a hash table that has a hash value for each page (4KB) of memory. If identical hashes are found, a bit for bit comparison is performed to ensure they really are identical. More on this process is available in a previous FAQ. Obviously, these comparisons take CPU and resources, so by default the duplicate detection is performed over a period of 60 minutes, as you can see below. The first image is for an ESX server with only a single VM running. As discussed in the linked FAQ, TPS still saves memory for a single VM, because even with shared libraries it's very common for the same DLL and other components to be loaded multiple times. As you can see, over one hour the duplicate memory is found and the system saves about 21MB of memory for an empty Windows 2008 64-bit VM.
Click to expand. |
In the next picture, I start a second VM running the same version (and architecture) of the OS. Once again, you can see the duplicate memory is found over the period of an hour, and now you see much bigger memory savings, nearly 200MB out of a total memory footprint of about 450MB for a each VM.
Click to expand. |
Once all the memory has been checked over the course of an hour, the cycle of checking for duplicate memory begins again. You can modify how long ESX takes to scan the entire memory of a VM, maximum number of scanned pages, and other settings through ESX's Advanced memory settings (Select the Server - Configuration tab - Advanced Settings under Software) as shown below. The default time for a scan is 60 minutes, and you shouldn't change these settings without extensive testing to make sure there's no negative impact on performance.
Click to expand. |
Related Reading:
Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.
About the Author
You May Also Like