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

Identifying when memory is the problem

Both your host memory and VM memory can indicate that it is under pressure. But the main challenge to a VMware admin is how to determine that there is a memory performance issue.

There are a few things which a VMware admin should understand is that there could be a memory performance issue and those are:

  • Your host memory consumption is approaching your total host memory
  • Active memory in your host is approaching your total memory
  • Ballooning is occurring
  • Host swapping is occurring

Now, if you wonder what is Active memory here in relation to Consumed memory, let me tell you that Active Memory is the amount of memory that is actively used, as estimated by VMkernel based on recently touched memory pages. For a VM this is referred to the amount of guest "physical" memory actively used.

An ESXi host calculates Active memory by using the sum of all active metrics for all powered-on virtual machines plus vSphere services on the host.

There could be another side to it, which can depict that VM is under memory pressure and to determine that you could combine the factors described previously. You should check whether VM memory has high percent utilization.

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 check the Memory Utilization of VM, you should follow 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 the Utilization of 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 the Usage metric from there and click on OK to continue.

The following is an example where you can see the utilization of this VM is almost 97 percent.

Now to check the overall host memory consumption and active host memory consumption, you need to 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 Memory Consumption.
  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. Make sure that the Consumed and Active, these two metrics are selected and click on OK to continue.

Now let us look at a sample screenshot and see what it looks like:

You can see in this example, that we have an ESXi host that has 32 gigabytes of physical memory, and we are consuming almost every bit of it.

However, if you look at the Active memory here, we are using little more than 7 gigabytes. So that means that although we have more than 30 gigabytes of consumed memory, we only have 7 gigabytes of Active memory. It should not create many issues. This could indicate overprovisioning of resources; if applicable, VMs should be right-sized by removing allocated RAM that is not required.