none
HyperV resource metering RRS feed

  • Question

  • Can anyone explain to me what the difference is between the 1 hour resource metering duration on HyperV and measure-VM is?

    From what I can see measure-VM picks up resource utilization from when you enable it on the VM.  If that is the case, what is the 1 hour duration on the Host?

    Thursday, July 11, 2019 2:16 PM

All replies

  • Hi ,

    By default, Hyper-V collects resource metering statistics once every hour. 

    If you want to change the collection frequency you can do so by using this command:

    Set-VMHost –ComputerName <host server name>  -ResourceMeteringSaveInterval <HH:MM:SS>

    As you look at the command above, you will notice that the collection frequency is being set at the host server level. You cannot adjust the frequency on a per VM basis.

    For your reference:

    Configuring Hyper-V Resource Metering

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,

    Candy


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

    Friday, July 12, 2019 2:08 AM
  • Hi ,

    Just want to confirm the current situations.

    Please feel free to let us know if you need further assistance.                   

    Best Regards,

    Candy


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

    Monday, July 15, 2019 1:57 AM
  • Hi Candy,

    I know about the 1 hour interval.

    My question is why have the 1 hour interval when measure-vm retrieves the statistics whenever you run it anyways?


    Monday, July 15, 2019 7:59 AM
  • Hi ,

    I am a bit confused about your description. If possible ,could you show me some screenshots that would help to explain your question is?

    As far as I know, once you enable resource metering, Hyper-V will begin collecting data. You can reset metering at any time. And then , we will discard the data we have collected up to that point and start fresh.

    When you measure, you are measuring the utilization over the timespan since you last reset metering. Metering is designed to collect this data over long periods of time.

    Best Regards,

    Candy


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

    Monday, July 15, 2019 8:54 AM
  • So for example I want to measure networking stats (inbound and outbound) on a VM every 5 minutes.  Every 5 minutes I run measure-vm against a specific VM where resource metering has been enabled.

    Every 5 minutes the values for networking change when I run the measure-vm command.

    My question is at the host the ResourceMeteringSaveInterval is set to default 1 hour.  What is the point of this setting because I can just run measure-vm at whatever interval I want.

    What is "ResourceMeteringSaveInterval" saving and where?

    Monday, July 15, 2019 9:00 AM
  • To elaborate, here is a clip of the command I ran every 2 seconds.  As you can see the processor "AvgCPU (MHz)" value changes with each query.  So my question is what does the 1 hour setting on the Host store if measure-vm can retrieve data at any given time (When I copy a large file the networking also updates with each run of the measure-vm command)?


    • Edited by ukkaapie Wednesday, July 17, 2019 11:41 AM
    Wednesday, July 17, 2019 11:41 AM
  • Hi ,

    Thanks for your clarifying. I have fully understood your question.

    >>measure-vm can retrieve data at any given time

    Does the data still update when the span more than 1 hour?

    In my test environment, it seems that the data will not change if the span more than 1 hour.

    If I reset VMResourceMeter, the data will update again when I run the measure-vm command.

    Since we cannot decrease ResourceMeteringSaveInterval (1 hour), I need to wait for more than 1 hour again to confirm this situation.

    If I have any updates, I will get back to you as soon as possible. I appreciate your patience.

    If you have any updates during this process, please feel free to let me know.

    Best Regards,

    Candy


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

    Thursday, July 18, 2019 8:33 AM
  • Hi Candy,

    So after an hour I measured twice within the hour with the following results that show the data is updated but not affected by the 1 hour setting on the host.

    

    That setting on the host is becoming a mystery.

    Thursday, July 18, 2019 3:49 PM
  • Hi ,

    Thanks for your efforts you have put into this case.

    I have run the measure-vm command after more than 10 hours. However , I find the data is still updated.

    I have the same confusion that what the purpose of ResourceMeteringSaveInterval is since we could run measure-vm to retrieve data at any given time.

    I did not find any related documents can help clarify this question, if you want to get a more satisfying explanation to this question, I would suggest you open a case with Microsoft.

    Your kind understanding is appreciated. 

    Best Regards,

    Candy


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

    Friday, July 19, 2019 2:46 AM