ESXi 6.x: Memory reclamation – TPS

Transparent Page Sharing has been described many times by many ‘vMagicians’, so i will not copy that info to this post.

In short how TPS works? memory pages of the vms are scanned by the process of identifying identical pages.  When two identical pages will be find one page copy is ‘removed’ and only link to first page is created.

Advanced settings:

Mem.ShareScanTime and Mem.ShareScanGHz

You can find more details in a book VMware vSphere 6.5 Host Resources Deep Dive by Frank Denneman and Niels Hagoort. Highly recommended.

  • To check minFree (amount of memory the VMkernel should keep free):

memstats -r comp-stats -s total:minFree:free:managedByMemSched -u mb

or run esxtop.

  • In ESXi 6.5 five memory state exists:

In ESXi 5.x only 4 memory state exists: High, Soft, Hard and Low.

  • To check the current state and the number of times the host was in a particular state since the last boot:

memstats -r comp-stats -s total:minFree:free:numHigh:numClear:numSoft:numHard:numLow:memState -u mb

  • Example: a total of 1506 MB (memory pages) is the same in all guests. By using TPS, ESXi needs 50 MB to “store” 1506 MB. So 1456 MB of memory is saving.

 

0 Shares