Determining if VMkernel has swapped out memory from the virtual machine
Either esxtop or VMware Infrastructure Client can be used to gather information about VMkernel swapping activity.
To use the VI Client to determine whether the VMkernel has swapped out any of the memory from the virtual machine:
- Click the Performance tab for the virtual machine.
- Switch to the Memory view.
-
Add the Memory Swapped (Average) statistic using the Change Chart Options dialog.
If the value is zero, the VMkernel has not swapped out any of the virtual machine memory, and this article does not apply.
If the statistic is non-zero, check the Memory Swap In (Average). This statistic records the total number of pages that have been swapped in by the VMkernel for this virtual machine. If increases in this statistic are correlated with time in the virtual machine falling behind, you can attribute the falling behind to the virtual machine memory being paged.
Can affect all kernels. Kernels with higher timer interrupt frequencies are more sensitive because as the period between timer interrupt shrinks, it gets shorter than the time required to read a page from disk. For example, with a timer interrupt frequency of 1000Hz, the period is 1ms, which is significantly shorter than a disk I/O which is approximately 4-10ms.
Solution
Run the Memory Balloon in the guest to discourage the ESX host from paging memory to disk.
Alternately, set the memory reservation equal to the memory size of the virtual machine, to reserve all of the physical memory for a virtual machine and prevent it from being paged to disk.
Note: When using the Memory Balloon driver, some memory may be paged out by the VMkernel while the virtual machine is booting before the Memory Balloon driver is loaded or there may be more memory pressure than the Memory Balloon driver can respond to.