Wake Up Your Mac Faster UPDATE: VMware RCLI now writes to ESXi Free Hosts
Dec 15

This post is sponsored by IT Knowledge Exchange. Visit ITKnowledgeExchange.com today to ask your toughest virtualization questions and get answers from your peers.

I got a question from a customer as well as a partner recently about whether or not they should use Perfmon in a Windows VM. I emailed our internal performance team to make sure that my answer of “no – it could give you bad results” was an ok answer. Turns out they’re in the process of writing a KB article on the subject and with their permissions I’ve pasted the draft of that KB article below. NOTE: This applies to ESX 3.5 and prior. Talk to your local VMware SE to get some insight into how things are changing. Unfortunately, I can’t talk about future offerings that haven’t been publicly talked about (press, VMworld, etc) in a blog posting.

———– The Draft KB ————

Do not use guest OS performance tools to monitor virtual machine performance

Details

There is often a difference between performance measurements taken from within a virtual machine’s guest operating system and those taken by VMware Infrastructure monitoring tools, such as VirtualCenter and esxtop.

The guest OS performance counters do not take into account the host’s hardware or the external constraints that might be set on the virtual machine, for example, resource reservation limits of a parent resource pool. As a result, resource utilization measured from within the guest OS might not reflect the true overall resource utilization measured at the physical hardware level. For example, consider an ESX/ESXi host running five virtual machines, each of which reports 100 percent CPU utilization by the guest OS tools. The guest does not know it is sharing the host CPU resources with other guests. On the other hand, the VirtualCenter Server and other virtual infrastructure monitoring tools are aware of these distinctions and report that each individual virtual machine is using 20 percent of the available CPU resources on the ESX/ESXi host. The host is 100 percent utilized and divides available resources among all virtual machines.

Inaccurate statistics can also the result of the virtualization system offloading certain tasks from the guest and virtualization overhead requirements. For example, the guest tools are not aware of the overhead memory required by the VMkernel.

Solution

To ensure the performance numbers are accurate for a virtual machine, perform functional testing on the virtual machine. The internal workings of the virtual machine should not be known by the tester or the performance tools. Follow these guidelines:

  • Use performance tools that are located outside of the virtual machine you are monitoring.

  • If possible, run the performance tools on a host where the virtual machine is not running.
  • For load tests, generate the load outside of the virtual machine being measured.
  • Do not use benchmarking tools. Instead, measure real applications.
No TweetBacks yet. (Be the first to Tweet this post)
VN:F [1.7.8_1020]
Rating: 4.3/5 (3 votes cast)
VN:F [1.7.8_1020]
Rating: 0 (from 0 votes)
Using Perfmon in a Windows VM4.353

  • drummonds
    Mike, found this old post at the top of a Google search and wanted to update it with a link to an article of mine. Your guidance remains 100% correct on Windows-based counters. But we added new counters in vSphere to Perfmon that are accurate within the guest (because they are actually host counters passed through the guest SDK).

    http://vpivot.com/2009/09/17/using-perfmon-for-...
  • Sweet. Nice addition, Scott.
  • It may be true that the VMware performance monitoring tools are sufficient if you want to monitor the usage of your virtual machines as a whole, but I'd still go for Performance Counters within Windows guests to differentiate between processes using up a lot of time. Same goes for disk monitoring; you still want to know if your Windows VM uses it's swap file correctly, or if it needs increasing for whatever reasons thinkable.
  • This article is true to an extent. Remember CPU and Memory are not the only measures of performance. I have solved a lot of problems by observing disk and I/O statistics (which can drive up memory and cpu utilization as the app churns waiting for I/O response). Those are still valid within the guest OS and if you are seeing high CPU and MEM this could be caused by the I/O. See the following blog entry and look at the VMware Product Mgr's response in the comments section.
    "Importantly, other counters when measured inside the guest such as Memory, Disk and Network don’t really suffer from accounting problems (i.e. they are accurate) as compared to CPU utilization numbers captured over a period of time (which may be accounted different due to the scheduling and de-scheduling the hypervisor does). So the numbers for Disk, Memory and Network when captured inside the Windows guest will be the same as the VI client."
  • Yup. Go vSphere 4.0!!
  • vmw
    Mike. There's a new feature in vSphere 4.0 that allows you to view "accurate" CPU utilization counters from the hypervisor about a VM using Perfmon (in-guest). Check out
    http://communities.vmware.com/blogs/drummonds/2...
  • you can always use VM Perfmon, which does show accurate results :-) as it uses information from the VMkernel, not from the guestOS, but it does run inside the VM :-)

    http://www.run-virtual.com/?page_id=156
  • lundrog
    Good to know, one of those things you learn every day that is important

    Roger L

    http://rogerlunditblog.blogspot.com/
blog comments powered by Disqus