Every couple of months I receive a request for an explanation as to why performance counters in a virtual machine cannot be trusted. While it is unfairly cynical to say that in-guest counters are never right, accurate capacity management and troubleshooting should rely on the counters provided by vSphere in either vCenter or esxtop. The explanation is too short to merit a white paper but I hope a blog article will serve as the authoritative comment on the subject.
Scott Drummonds on Virtualization
I was recently shown a problem where the ESX Perfmon counters we added to vSphere 4.0 virtual machines were not appearing in Windows virtual machines as of vSphere 4.0 U1. The problem stems from an issue with mofcomp, which I will briefly describe below. For the impatient, the workaround is to manually uninstall and then reinstall VMware Tools. It also appears that the counters can be added by running vmStatsProvider, as I described in a previous article.
esxtop remains a popular performance troubleshooting tool because of its fine granularity, expansive counter list, and support for interactive and off-line analysis. The biggest problem with esxtop is the huge CSV files generated in batch mode. The output is so large that Excel is unable to open the file and Perfmon can take hours to do so. But now we have a better way to manage esxtop batch files.
[An update to an old community post with more information on the tool.]
My colleague in product management, Praveen Kannan, has been working to extend Perfmon to show some ESX performance counters. This capability is automatically installed with VMware Tools on vSphere 4. But Praveen and I have made a stand-alone version available to those of you that are still on VI3. Download it here to give it a try. [See note below if that link is dead.]