Condividi tramite


Hyper-V Performance Counters – Part two of many – “Hyper-V Hypervisor” counter set

The “Hyper-V Hypervisor” counter set is a good place to start when looking for overall system information and what is running under Hyper-V.

Hyper-V Hypervisor counter set counters:

· Logical Processors – These are the number of cores / HT that the hypervisor is managing. If you have a dual proc quad core without HT you will see this number set to 8. If you also had HT it would be set to 16. Today this value is fixed after boot and won’t change. In the future we may support hot add and remove of processors in which case this will be dynamic.

· Partitions – Each virtual machine on the system is run in a container called a partition. If you have no VM’s running this value will be set to 1 because the “host OS” called the “root” in Hyper-V is also running in a partition. So if you have 2 guest VM’s running this value will be 3. +1 for each guest and +1 for the root.

· Total Pages – The Hypervisor needs memory in order to keep track of Virtual Processors, Guest Virtual address to System Physical Address translation entries in the virtual TLB, etc. So the total pages keep track of the total amount of memory the Hypervisor is using for management or partitions. A page is 4KBytes. This is not the total amount used to support a guest. You would also need to get this by looking at the size of the worker process (vmwp.exe) and account for memory in vid. Since we don’t publish numbers on non-RTM releases I’ll have to wait to you the overhead value (future post). Total Pages can change based on what guests VM’s are running.

 

Here is an example of how the Hypervisor gets memory - A user want to start a VM so the vid makes a hypercall to the Hypervisor via winhv.sys to create a partition. In order to create VPs, vTLBs, … in the the Hypervisor needs memory so it makes a call to the root via winhv.sys. Winhv.sys then allocates memory from the root and makes a hypercall to deposit memory and then the whole process unwinds and the partition create completes.

 

You will see the term “Deposit” in other performance counters. Now you know what it means.

· Virtual Processors – All execution in the root and child partitions (where guest VM’s run) happens on Virtual Processors (aka VP’s). At a minimum you will see on VP for each Logical Processor (LP). These account for the root VP’s. You will then see +1 for each VP you have configured to a guest. So if you have an 8LP system with 1 guest running with 2VP’s the count here will be 10.

· Monitored Notifications – Monitored notifications are part of an interrupt coalescing technique Hyper-V uses to reduce virtualization overhead. For example when a guest has data to transmit over the network it could send an interrupt for each packet to the root VP that will actually do the I/O or it can send one interrupt to let the root know data is starting to flow. This counter is an indication of the number of “flows” of interrupts being set to the root and guests.

Comments