How to interpret values of Perfmon counter Hyper-V Hypervisor Virtual processor\CPU Wait time per dispatch

cpu-usagehyper-vperformancevirtualizationwindows-server-2012-r2

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!

Best Answer

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.

Related Topic