Perfmon or resource meteering?

Hyper-v servers = 2012 R2 (core)

I want to make sure that my VMs are getting the resources it needs. If I want for example, monitor RAM on my VMs, I would setup perfmon inside my VMs to monitor memory usage, correct? If any VM is running low I'll just simply allocate more RAM.

My confusion comes when monitoring CPU. What I've read so far is that I cannot monitor the processor counters inside my VM. I need to monitor from the Hyper-V host itself, correct? If this is the case then I imaging I would use logman, perfmon command line utility or do I use VM Resource Meteering instead?

For now I want to focus on the VMs and not the Hyper-V host. I want to make sure the VMs are getting the resources it needs.

Best regards.

July 29th, 2015 8:07pm

Why can't you monitor the processor counters inside a VM? I have been doing this for a while and haven't experienced any troubles.

I don't think that the built-in resource metering tools will give you what you're interested in, but there's nothing stopping you from setting it up alongside perfmon and seeing if you agree.

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 12:59pm

I've been monitoring VMs within the VM itself for a while and never saw any issues in terms of values returned by the counters. But, it wasn't until recently that I started to research more on VM and Hyper-V performance that I ran into a few sites suggesting not to use the VMs processor counter.

"Traditionally, processor performance can be measured using the \Processor(*)\% Processor Time performance monitor counter. This is not an accurate counter for evaluating processor utilization of a guest operating system though because Hyper-V measures and reports this value relative to the number of processors allocated to the virtual machine."

Site: https://msdn.microsoft.com/en-us/library/cc768535%28v=bts.10%29.aspx

Section: Measure guest operating system processor utilization

--Alex

July 30th, 2015 1:11pm

That makes sense. I gather the host % alongside the guests, and since the hosts almost never reach any meaningful numbers, I can be reasonably certain the guests aren't waiting.

In all honesty, I don't care much for CPU % utilization measurements for capacity planning/measuring because it just doesn't tell me that much. I much prefer System\Processor Queue L

Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 1:19pm

Yes, definitely the System\Processor Queue Length is one counter that I always measure. I will test both ways and compare the results. I am not using System center, which can aid in the placement of VMs based on utilization and Hyper-V host resources, so I have to manually test the host and VM performance and allocate resources as necessary.

Thanks for your input.

--Alex

July 30th, 2015 1:30pm

Hi alexltk0506,

Actually both the CPU Time counter value and Hyper-V host Time counter value is correct, you can refer the following article to realize why the vm counter lie.

Hyper-V Concepts - vCPU (Virtual Processor)

http://social.technet.microsoft.com/wiki/contents/articles/1234.hyper-v-concepts-vcpu-virtual-processor.aspx

Hyper-V: Clocks lie... which performance counters can you trust?

http://blogs.msdn.com/b/tvoellm/archive/2008/03/20/hyper-v-clocks-lie.aspx

Im glad to be of help to you!

Free Windows Admin Tool Kit Click here and download it now
August 4th, 2015 1:48am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics