locked
Hyper-V Host CPU Load distribution RRS feed

  • Question

  • I am setting up monitoring on the Hyper-V hosts and attempting to optimize the VM hosts.
    This is a set of two Hyper-V hosts in a cluster, with about 50 Virtual Machines
    In the monitoring I notice the CPU core utilization is not even (I copied the top CPU PercentLoad)
    At time one CPU core goes very

    I am looking for advise on:
    -Is this normal?
    -How can I optimize the hosts to distribute the CPU load evenly and utilize all the cores?

    CPU # 11 93%
    CPU # 44 69%
    CPU # 40 50%
    CPU # 1  26%
    CPU # 2  20%
    CPU # 47 13%
    CPU # 35 13%
    CPU # 30 7%
    CPU # 42 7%
    CPU # 23 7%
    CPU # 16 7%
    CPU # 14 7%
    CPU # 13 7%
    CPU # 36 7%
    CPU # 38 7%
    CPU # 43 1%
    CPU # 45 1%
    CPU # 52 1%

    Thank you for your help.


    Sky

    Thursday, August 24, 2017 8:03 PM

Answers

  • "What I understand is that the applications running on the Virtual Machines are not using the all available CPU cores.  Is that correct?"

    Yes.  The cores are scheduled by Hyper-V to the VMs.  Once a VM is scheduled to a specific core or cores, Hyper-V attempts to keep the VM running on the same cores.  Hyper-V can move a VM from one core to another, but it is an 'expensive' operation so it tries not to do that. 

    "I believe I need to find which application is using which CPU core.  Am I correct?"

    Find out which cores the VM running the application is running.

    "I think must run Performance Monitor to measure the relative CPU consumption?  If this is correct, would you suggest which perfmon counters I must check?"

    See https://msdn.microsoft.com/en-us/library/cc768535%28v=bts.10%29.aspx?f=255&MSPPError=-2147217396 for information on monitoring Hyper-V performance.  You can also use your favorite search engine to find a number of third party tools to assist in monitoring.

    BTW, did you read the earlier reference provided that explains how CPU is allocated?  It will help in answering your questions.


    tim

    • Marked as answer by Sky Art Thursday, August 31, 2017 1:03 AM
    Wednesday, August 30, 2017 1:37 PM

All replies

  • Hi Sky,

    Check if my understanding is correct, your hyper V host is multi-process, and you find the CPU utilization of each core is not even. Feel free to correct me if I misunderstood.

    If my understanding is correct, then, the CPU resource distributing is decided by system, and depends on the applications running on the hosts, if some applications not support on multi-process, then the use only use one core's resource.

    It's recommended to check what application eats the most resource, and try to do some clean up things, check if it could help.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, August 25, 2017 6:34 AM
  • Anne

    Thank you for your reply.
    Yes, your understanding is correct.
    The Hyper-V Hosts are System x3650 M5 with 2x CPU 18 cores each

    From you reply I understand that I must check which applications are running on the hosts.

    The hosts are running only the Hyper-V role and I have multiple Virtual Machines running, most of them Windows 2012 R2.

    Are you suggesting that I must check the applications within the Virtual Machines?

    Thanks

    Sky

    Saturday, August 26, 2017 2:59 AM
  • "Are you suggesting that I must check the applications within the Virtual Machines?"

    Yes.  The applications are generating the load on the CPUs, not Hyper-V.  Looking at the individual processors at the Hyper-V level is not giving you any granularity of what is causing the load.

    This article - http://www.altaro.com/hyper-v/hyper-v-virtual-cpus-explained/ - might help you understand better how Hyper-V allocates physical CPU resources.


    tim

    Saturday, August 26, 2017 12:02 PM
  • Hi Sky,

    Just to check if the above reply could be of help, if yes, you may mark useful reply as answer, if you have other concerns, welcome to feedback.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, August 29, 2017 3:01 AM

  • Please help me understand it better.
    What I understand is that the applications running on the Virtual Machines are not using the all available CPU cores.
    Is that correct?
    I believe I need to find which application is using which CPU core.
    Am I correct?
    I think must run Performance Monitor to measure the relative CPU consumption?
    If this is correct, would you suggest which perfmon counters I must check?
    Should I be checking this on each VM or on the Hyper-V nodes?

    Thank you very much for your help.


    Sky

    Wednesday, August 30, 2017 1:55 AM
  • "What I understand is that the applications running on the Virtual Machines are not using the all available CPU cores.  Is that correct?"

    Yes.  The cores are scheduled by Hyper-V to the VMs.  Once a VM is scheduled to a specific core or cores, Hyper-V attempts to keep the VM running on the same cores.  Hyper-V can move a VM from one core to another, but it is an 'expensive' operation so it tries not to do that. 

    "I believe I need to find which application is using which CPU core.  Am I correct?"

    Find out which cores the VM running the application is running.

    "I think must run Performance Monitor to measure the relative CPU consumption?  If this is correct, would you suggest which perfmon counters I must check?"

    See https://msdn.microsoft.com/en-us/library/cc768535%28v=bts.10%29.aspx?f=255&MSPPError=-2147217396 for information on monitoring Hyper-V performance.  You can also use your favorite search engine to find a number of third party tools to assist in monitoring.

    BTW, did you read the earlier reference provided that explains how CPU is allocated?  It will help in answering your questions.


    tim

    • Marked as answer by Sky Art Thursday, August 31, 2017 1:03 AM
    Wednesday, August 30, 2017 1:37 PM
  • Tim
    Thank you for your reply.
    Yes, I did read that article. you reply has made it a more clearer for me to understand.

    Thank you


    Sky

    Thursday, August 31, 2017 1:02 AM