Resource Metering allows you to record the following information in Window Server 2016
- Average CPU usage
- Measured in MHz. This unit was selected by developers in order to calculate the CPU usage properly even during VM migration across hosts with different CPU capacity. Metering information in such cases migrates with the VM as well and you’re getting an average value.The formula is as follows: The CPU frequency of the Hyper-V host multiplies to an average CPU consumption by this VM (decimal) and to a number of hours host.
- Example: A VM, which worked on a host with 3 GHz CPU and took 30% of CPU utilization within an hour will get: 3000 MHz*0.3*1 = 1000 MHz
- Average memory usage, Minimum memory usage, Maximum memory usageMemory usage is reported in MB. Minimum memory usage is reported (in MB) according to the time when the VM was working, not shut down.
- Maximum disk allocation
- Maximum disk allocation is reported in MB, including the size of the virtual disks and checkpoints (snapshots) together. Note: If you use thin (dynamically expanding) disks, they will be reported as its full possible size, regardless of the actual amount of data on them.
- Inbound network traffic, Outbound network traffic
- Network traffic is also measured in MB. Only network traffic that costs money (internet) is taken into account. Intranet traffic is not calculated since it doesn’t cost a dime to a service provider. Traffic calculation is performed with an assistance of 2 access control list (ACL) sets, which are created once you enable resource metering, and distinguished outbound from inbound, IPv4 from IPv6 and internet from intranet traffic.
Let’s run the Measure-VM cmdlet now and check the measured values in my lab. Following command lists all VMs on this host and displays resource metering, when enabled:
Get-VM | Measure-VM