On this last post I am going to talk about what counters should be used to monitor the Network performance of your Virtual Machines, your Virtual Switches and your Physical Network Adapters. Performance monitor is a very powerful tool that is included OOB with Windows and can be used to figure out if your Networking Stack is saturated or not.

Monitoring the physical layer

The first place where you may want to take a look is at the Physical layer. This can be done using the already known \Network Interface\ Performance object counter. This object has several counters inside that will show us if our physical adapter is saturated or not and how much traffic is handling. The reason why we should monitor this counter even when talking about Hyper-V is because this counter tell us the total throughput of the hardware and if this counter shows some kind of bottleneck we should think on adding more physical NICs or load balance the workloads. (i.e. separate network traffic from different VMs across different physical NICs that are used by Hyper-V External networks )

The most relevant counters of this object are:

clip_image001 \Network Interface(*)\Bytes Total/sec

This counter indicates the total input and output bytes per second. You can use the next table as the limit reference depending on the speed of the adapter.

image

clip_image001[1] \Network Interface(*)\Current Bandwidth

This counter indicates the speed of your physical network adapters. This will depend on the adapter speed and the physical switch network speed. If your NIC is a 10GB NIC but the switch where is connected only works at 1GB this counter will show 1GB as the bandwidth of your adapter.

clip_image001[2] \Network Interface(*)\Output Queue Length

Indicates the length of the queue in packets. This counter should be 0 at all times. If for some reason this counter is above 0 you may want to follow the steps from this blog: http://blogs.technet.com/b/yongrhee/archive/2010/07/07/network-interface-output-queue-length-values-extremely-high.aspx

Monitoring the Virtual Switch layer

The second place where we can monitor Hyper Network traffic is at Virtual Switch level.

You should be aware that Hyper-V permits to create 3 different kinds of networks with their respective Virtual Switches.

External Network will require a Physical NIC to be created.

Internal Network will not require any Physical NIC but will create a logical adapter in your host

Private Network will not require any physical NIC and will be used only by VMs.

So if you want to monitor how much traffic is sent and received across your virtual switches you can use the following counters. Each Virtual Switch will have they own counters.

clip_image001[3] Hyper-V Virtual switch\Bytes/sec

This counter indicates the total bytes per second (received and sent) on all ports of your Virtual Switch.

clip_image001[4] Hyper-V Virtual switch\Bytes received/sec

This counter indicates the total bytes received per second on all ports of your Virtual Switch.

clip_image001[5] Hyper-V Virtual switch\Bytes sent/sec

This counter indicates the total bytes sent per second on all ports of your Virtual Switch.

There are other interesting counters inside the Hyper-V Virtual Switch Object but are for other reasons rather than capacity and consumption.

Note that this counter may show the double consumption compared with the \Network Interface\Bytes Total/sec because it counts the Input and Output traffic of each port. If a Virtual Machine that is connected to an External Switch is sending 1000 bytes/sec this will means that the Virtual Switch is seeing 1000 bytes/sec on the port where the VM is connected and also 1000 bytes on the port of the switch that is connected to the external world.

Monitoring the VM layer

Finally you can monitor the exact amount of network traffic that is using each of your VMs. This is really useful because helps you to understand what VMs are consuming more bandwidth and when, so you can balance your VMs across your switches if needed and also give you a central point to monitor the network utilization baselines of each VM.

Depending if your virtual machines are using synthetic, legacy or both network adapters you should use the following counters. Each VM will have they own counters:

clip_image001[6] Hyper-V Virtual Network Adapter\Bytes/sec

This counter indicates the total bytes received and sent of the selected VM

clip_image001[7] Hyper-V Virtual Network Adapter\Bytes received/sec

This counter indicates the total bytes received of the selected VM

clip_image001[8] Hyper-V Virtual Network Adapter\Bytes sent/sec

This counter indicates the total bytes sent of the selected VM

clip_image001[9] Hyper-V Virtual Legacy Network Adapter\Bytes sent/sec

This counter indicates the total bytes sent of the selected VM

clip_image001[10] Hyper-V Virtual Legacy Network Adapter\Bytes received/sec

This counter indicates the total bytes received of the selected VM

Note that the Hyper-V Legacy Network Adapter is a little bit tricky because you have to SUM both counters if you want to know to total amount of network utilization.

You can use the following thresholds as reference for all network counters mentioned above except for Current Bandwidth, and the Output Queue length counters from Network Interface object.

Healthy: less than 60%

Warning: between 60% and 80%

Critical: more than 80%

Now that you are familiar with this counter let’s show you a possible workflow to troubleshoot or detected network bottlenecks on your Hyper-V hosts or your Virtual Machines

clip_image003