Key memory performance metrics to monitor
To troubleshoot memory performance in a VMware vSphere environment, you should monitor the memory performance very carefully. In this aspect you should monitor the following metrics:
- Average memory active: Memory estimated to be used based on recently touched memory pages.
- Average memory swapped in or out: Virtual memory swapped to or from disk.
- Average memory swapped: Total amount of memory swapped out. This indicates a possibility (with an unknown likelihood) of poor performance in the future.
Getting ready
To step through this recipe, you will need a running ESXi Server, a couple of running memory-hungry Virtual Machines, and a working installation of vSphere Client. No other prerequisites are required.
How to do it...
To spot the average Active Memory, you should check both the VM level and Host level. To monitor at the VM level, you should perform the following steps:
- Open up vSphere Client.
- Log in to the vCenter Server.
- On the Home screen, select VMs and Templates.
- Choose the VM where you want to monitor Active Memory.
- Go to the Performance tab on the right-hand side.
- Select Memory from the drop-down list.
- Click on the Advanced tab, and select Chart Options.
- Select Active metric from there and click on OK to continue. Active is usually the one that estimates how much the VM would actually need.
One of the biggest myths is that when a host is low on memory, performance problems are likely, or that a VM needs more memory than it has installed, because you're looking at a Granted or Consumed type of metric instead of Active-type metrics.
The following is a sample screenshot, which you see once you select the Active metric to monitor memory performance:
In the preceding example, you can see that Memhog-VM3 is using close to 1 gigabyte of memory, which means the Active memory is 1 gigabyte, whereas the configured memory for this VM is also 1 gigabyte.
If you want to monitor this metric for the ESXi Host level then perform the following steps:
- Open up vSphere Client.
- Log in to the vCenter Server.
- On the Home screen, select Hosts and Clusters.
- Choose the ESXi host where you want to monitor the Active Memory.
- Go to the Performance tab at the right-hand side.
- Select Memory from the drop-down list.
- Click on the Advanced tab, and select Chart Options.
- Select Active metric from there and click on OK to continue.
The following is a sample screenshot, which you see once you select the Active metric to monitor memory performance:
In this example, you can see that ESXi host is using 4077560 Kilobytes of Active memory.
Note
You may notice another Shared common metric here. This is a measure of savings due to TPS. Having TPS run does not have any downside and does not provide any reason to monitor it either. You could get into most shared pages being zeroed pages, and the VDI is more likely to share memory if all of the guest operating systems are the same. TPS doesn't work with large pages, which are standard now, until you hit a threshold, where the large pages are broken down and then TPS starts.
Now to monitor Swapped, Swap in, and Swap out, you should follow the Monitoring host swapping activity recipe.
How it works...
To understand how swapping happens, you should check the Monitoring host swapping activity recipe.
The average active memory refers to the average amount of memory that is actively used in kilobytes.