4

So there is a lot of guidance on the web that advises tracking the values of the Perfmon counter Hyper-V Hypervisor Virtual processor\CPU Wait time per dispatch as the nearest Hyper-V equivalent of VMWare's CPU ready time.

Unfortunately there does not seem to be much guidance regarding what values of this counter are likely to be problematic, or what range of values is expected on a well-performing system.

My initial thought was that if CPU usage rises at the same time as CPU Wait time per dispatch, this is an indication that there is a CPU bottleneck on at least one guest vCPU.

Is there a better way to interpret this counter? For example, is it possible to convert it to a percentage of time waiting for the CPU?

Is there a reference range of values that Microsoft or Hyper-V practitioners tend to work with?

Could anyone give me an indication of what values they're seeing for this counter on well-performing systems that do not have CPUs oversubscribed?

Thanks!

2

The CPU Wait Time Per Dispatch counter in either the Hyper-V Hypervisor Root Virtual Processor or the Hyper-V Hypervisor Virtual Processor counter sets means, quite simply:

The average time (in nanoseconds) spent waiting for a virtual processor to be dispatched onto a logical processor.

The answer of "what should it be?" entirely depends on the hardware. You just want it to be as low as possible, but some computers are faster than others.

Another thing to keep in mind is that virtual machines with more vCPUs will incur a slight cost in synchronization overhead.

So just as an anecdote, I am looking at a Hyper-V host with 8 logical processors. On that Hyper-V host, there is only one running virtual machine. That VM has two vCPUs. So there should be practically no contention at all over the processors.

The vCPUs on that virtual machine spend about 7000 to 10000 nanoseconds waiting, after becoming ready to run, to be dispatched onto a logical processor.

These numbers will be different if you have a faster or slower physical processor, or if you a higher ratio of virtual machines/vCPUs to logical processors on your host. More vCPUs on your host = more things for the dispatcher to schedule = wait time climbs. This also demonstrates why you really do not want to install other software on your host machine other than just the Hyper-V role - because extraneous software on the host machine will preempt and defer the scheduling of work that the vCPUs want to do, thus driving that number up yet again.

1

To calculate the percentage of performance lost, per CPU, perform the following:

Take the collected value and divide by the number of units in the polling interval, then multiply by 100 to get the percent impact. For example, if the metric collected is 50 milliseconds, and the collection period is 20 seconds, divide 50ms by 20000ms, times 100%, and you get a 0.25% performance impact on that virtual CPU during that collection period.

  • Thanks David. I was thinking I could do something like this but got thrown off by the 'per dispatch' part. Does this imply I need to know how many dispatches there are before I can convert this to a percentage of time? – James L Mar 18 '15 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.