vSphere High Performance Cookbook
上QQ阅读APP看书,第一时间看更新

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:

  1. Open up vSphere Client.
  2. Log in to the vCenter Server.
  3. On the Home screen, select VMs and Templates.
  4. Choose the VM where you want to monitor Active Memory.
  5. Go to the Performance tab on the right-hand side.
  6. Select Memory from the drop-down list.
  7. Click on the Advanced tab, and select Chart Options.
  8. 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:

  1. Open up vSphere Client.
  2. Log in to the vCenter Server.
  3. On the Home screen, select Hosts and Clusters.
  4. Choose the ESXi host where you want to monitor the Active Memory.
  5. Go to the Performance tab at the right-hand side.
  6. Select Memory from the drop-down list.
  7. Click on the Advanced tab, and select Chart Options.
  8. 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.