highlydense
highlydense

Reputation: 83

Azure percent-cpu avg and max are too different

azure monitoring

The graph shows cpu's max > 96%, but cpu's avg < 10%

How can this be the case? (I mean, shouldn't cpu's avg > 40, or at least >30?)

Upvotes: 8

Views: 4842

Answers (2)

Steve Bonds
Steve Bonds

Reputation: 311

I asked Microsoft Azure support about this. The answer I received was not great and essentially amounts to "Yes, it does that." They suggested only using the average statistic since (as we've noticed) "max" doesn't work. This is due to the way data gets aggregated internally. The Microsoft Product engineering team has a request (ID: 9900425) in their large list to get this fixed, so it may happen someday.

I did not find any documentation on how that aggregation works, nor would Microsoft provide any.

Existing somewhat useful docs:

Upvotes: 1

Dijkgraaf
Dijkgraaf

Reputation: 11527

Not really, I estimated some of the values from the Graph, and put them in a spreadsheet and calculated a 5 Min Average, as well as calculated the Max CPU and the Average of the 5 Min Average. Below is what it looks like. When you are doing an Average over a time, it smooths out all the peaks and lows.

Max 5 Min Avg
85  
40  
20  
5   
25  35
40  26
5   19
10  17
99  35.8
    
Max Average
99  26.56

If it is continually at high CPU, then your overall average will start growing.

However that average does look rather low on your graph, but you aren't showing the Min CPU either, so it may be short burst where it is high, but more often low CPU usage, you should graph that as well.

Are you trying to configure alerts or scaling? Then you should be looking at the average over a small period e.g. 5 minutes, and if that exceeds a threshold (usually 75-80%) then you send the alert and or scale out.

Upvotes: 1

Related Questions