Q. How long does it take for VMware Transparent Page Sharing (TPS) to find all duplicate pages of memory for a virtual machine (VM)?

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.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.