VMware Cloud Community
gilesm
Contributor
Contributor

vCenter real-time performance metric refresh interval vs. "VM Processor" in-guest counter interval

The vSphere SDK documentation states that real-time performance metrics refresh every 20 seconds so when I graph something like "VM cpu usage" I see a new data point in the console every 20 seconds. If I were to compare this counter to the "VM Processor(_Total)\% Processor Time" in the guest OS I would expect these values to match up as I think they represent the same thing (right?). I assume that since the vCenter real-time counter interval is 20 seconds that perfmon could not get a new value unless the refresh interval of 20 seconds has expired. What I actually see is that perfmon shows me a new value every second (a perfmon setting) and they are not duplicate values repeated until the next interval expires. So it looks like the in-guest counter can get updated every second even though vCenter only refreshes the counters every 20 seconds for the APIs and graph console. Is the in-guest counter really getting a new value every second or are the values in between the 20 second refresh interval bogus? The 20 second interval values perfmon shows appear to match up with what is in the vCenter graph but sometimes I get blips on the in-between values. Can those be trusted? Is the graph console just showing me refreshed values and are all the "in-between" values really correct in the guest? If you do this for a lot of machines that would make me think each VM counter is adding an unnecessary load to the corresponding physical resources if you are doing this on all your VMs. Thanks in advance.

0 Kudos
2 Replies
vmMarkA
VMware Employee
VMware Employee

Performance data provided to perfmon comes from our vmstatsprovider which collects it directly from the vmkernel on which the guest is running.  So this granular 1 second data is real and can be trusted.

vCenter gets its data from the ESXi host via a different mechanism and creates a 20 second averages.

Due to the sampling period never being perfectly aligned, and when the average is calculated, the vCenter 20sec sample should 'approximate' 20x 1sec vmtools averages.

Hope that helps!

Technical Marketing, Performance Specialist, VCDX @vmMarkA, virtualizationeh.ca
0 Kudos
gilesm
Contributor
Contributor

vmMarkA,

Thanks for the detailed information. Makes sense.

0 Kudos