• Advertisement
Join the IT Notebook

vSphere all - ESXi 3.5+ - Enabling TPS small page size for Nehalem processors

Anything related to VMware vSphere. Articles are posted in "vSphere Version - vSphere Component - Subject" format.

vSphere all - ESXi 3.5+ - Enabling TPS small page size for Nehalem processors

Postby lmmtux » Fri Mar 07, 2014 3:49 pm

On Nehalem based processors, ESXi defaults to using 2 MB page file sizes for memory sharing. This increases speed and performance but decreases the chance of memory sharing among similar guest operating systems. The workaround is to set the page size to 4 KB, which can increase CPU yet increase memory sharing as well. Typical CPU increase is about 5%, while memory sharing can increase from 10% - 40%. Results may vary depending on the operating system diversity on your ESXi hosts as well as additional services that are running on those operating systems.

The setting below will enable small page size (4 KB) for TPS (transparent page sharing). The ESXi host does not need to be restarted for this to take effect. But, the virtual machines must either be evacuated and returned to the ESXi host, or rebooted, in order for the setting to start working.

Check CPU Type

Note: The TPS small page size setting will only benefit if the CPU type of the ESXi host is in the Nehalem generation. To check which processor you have, follow these steps.

  1. Open vSphere Client, and navigate to the ESXi host.
  2. Click on the "Summary" tab.
  3. Under "VMware EVC mode", verify the CPU generation type. If "Nehalem", then proceed with the steps below to modify the TPS setting. Otherwise, the setting will not benefit.
    evc_mode_check.jpg (36.98 KiB) Viewed 1696 times

Forcing TPS small page size for ESXi:

  1. Open vSphere Client and navigate to each ESXi host, then click on the Configuration tab.
  2. Under Software, click on Advanced Settings.
  3. Scroll to Mem, then view the second setting in the list which should be called "Mem.AllocGuestLargePage". Set this to 0 (zero).
    vmware_tps_sbs_enable.jpg (113.75 KiB) Viewed 1696 times
  4. Click OK to save this setting.
  5. Configuration is complete for the ESXi host.
  6. Evacuate all VMs from the ESXi host. This can be done by putting the host in to Maintenance Mode and then taking the host back out of Maintenance mode (to force all VMs to be vMotioned to another host and back), or by manually vMotioning all VMs to another host. Alternatively, the VMs can be rebooted for the setting to take effect. One method or the other (or a mix) must be done on all VMs of the host for the setting to completely work across all VMs.
  7. Repeat all of the steps above as necessary on any additional ESXi hosts.

Monitor Results

To see if the setting above applied or is increasing shared memory for TPS, there are a couple of options. One method is to chart the "shared" memory in the memory graph of the ESXi cluster or hosts under the Performance tab. The best results are shown by clicking on the cluster then the Performance tab, then Advanced.

tps_sbs_result1.jpg (90.17 KiB) Viewed 1696 times
Posts: 55
Joined: Mon Jul 30, 2012 9:40 pm
Reputation: 0

Return to VMware vSphere