Hyper-V Performance Monitoring and Optimization

Hyper V 2012 R2 Server

This article will guide you about how to effectively use Hyper-V performance monitor and maintain your node performance. We’ve frequently seen that many server administrators, when they start receiving performance alerts, they start migrating Virtual Machines to other nodes. This is not the right solution always.
In the case of alerts, Hyper-V performance monitor tool can be very helpful. In the performance monitor, please start looking at Hyper-V Logical Processor and Hyper-V virtual processor counters.

Hyper-V Logical processor – Total Run time

Hyper-V Logical processor is useful to measure actual CPU usage on the server. When there is a performance issue, most of the techs will start looking at task manager. Please note that Windows task manager does not show the actual CPU usage. To view actual CPU usage, look at the Hyper-V Logical processor by following steps:

  • Click on Start Button.
  • Go to Administrative Tools and select Performance Monitor.HyperV Performance Monitor
  • Now expand Monitoring Tools option and select Performance Monitor.HyperV Performance Monitor graph
  • By default, this window will explain you the actual %Processor time.
  • To see Total Run time of Logical Processor, click on Add (+) icon.
  • A new Add Counters Window will be displayed on the screen.
  • Now select HyperV server from the drop down list. If you can not find the server in the drop down box, click on Browse button … and search for appropriate server.
Add Counters in HyperV Server
  • After selecting appropriate server, select Hyper-V Hypervisor Logical Processor option from list and click on + icon to view the sub options.
Add Counter for HyperV Logical Processor
  • Now select % Total Run Time option and click on Add>> button.
HyperV Total Run Time in %
  • You will see % Total Run Time option is added in Added Counters list.
  • Now click on OK button to monitor Total Run time of the Logical Processor.
HyperV Server Total Run Time in %
  • You can see the graph for this. By double clicking on particular option from the bottom, you can change line color and size.
Total Run Time Graph
  1. If Total Run Time is Less than 60%, your CPU usage is in Healthy state.
  2. If it is between 60% to 89%, your CPU usage is in Monitor or Caution state.
  3. However, if you found that it is above 90%, it is in Critical state and the performance of the server will be adversely affected.

If your HyperV is in situation 3, you need to check for the high usage VMs on that HyperV node.

Hyper-V Virtual processor – Guest Run time

This performance counter will help you to find Virtual Machines consuming the most CPU resource. To determine which virtual machines are consuming CPU, perform following steps :

  • Click on Start Button.
  • Go to Administrative Tools and select Performance Monitor.
HyperV Performance Monitor
  • Now expand Monitoring Tools option and select Performance Monitor.
HyperV Performance Monitor graph
  • By default, this window will show you the actual %Processor time.
  • To see Total Run time of Logical Processor, click on Add (+) icon.
  • A new Add Counters Window will be displayed on the screen.
  • Now select HyperV server from the drop down list. If you could not find the server in the drop down box, you can click on Browse..button and search for appropriate server.
Add Counters in HyperV Server
  • After selecting appropriate server, select Hyper-V Hypervisor Virtual Processor option from list and click on + icon to view the sub options.
  • Now select % Guest Run Time option.
  • From Instances of selected Object list, select <All instances> option to see the graph of all VMs.
  • Click on Add>> button.
Guest Machine Run Time in %
  • You will see % Guest Run Time option is added in Added Counters list.
  • Now click on OK button to monitor Total Run time of the Guest Processor.
Guest Machine Run Time in %
  • You can see the graph for this.

Now identify the VMs which are consuming high CPU. You can know the VM name by moving mouse arrow on particular graph line. Once you get VM names, you can login to those VMs to check if there is any unusual activity or something else is running on that VM or not.

Guest Machine Run Time Graph

From task manager we have to check high CPU usage processes of that VM. In most cases there should be some issue with those services. There is no fix pattern to troubleshoot such issue. we have to act depending on the situation, If required we can also restart the service which is consuming high CPU.

Following video demonstrates how to create performance view of a Hyper-V environment :
[embedyt]https://www.youtube.com/watch?v=hjgSBLv2Noc[/embedyt]

Note: Kindly add counter under Monitoring tools -> Performance Monitoring. Never use data collector counter since it saves the data in files and it will fill up C: drive quickly if you have selected large number of counters.

(Visited 9,948 times, 6 visits today)

Latest Comments

  1. JR February 6, 2023

Leave a Reply

AlphaOmega Captcha Classica  –  Enter Security Code
captcha      
 

This site uses Akismet to reduce spam. Learn how your comment data is processed.