Hello Anil Kumar
Sharing responses for your queries:
-Does Azure Advisor takes into consideration the max or P95 max CPU usage of VMs while generating Rightsizing recommendation? Below article mentions:
Recommendation criteria include CPU, Memory and Outbound Network utilization.
Metrics are sampled every 30 seconds, aggregated to 1 minute and then further aggregated to 30 minutes (taking the max of average values while aggregating to 30 minutes).
Yes, Azure Advisor does take into consideration the maximum CPU utilization of the VMs while generating Rightsizing recommendations. The article you mentioned is correct that the metrics are sampled every 30 seconds, aggregated to 1 minute, and then further aggregated to 30 minutes (taking the max of average values while aggregating to 30 minutes). This means that Azure Advisor considers both the average and maximum CPU utilization of the VM over a 30-minute period to determine the VM usage.
The article you mentioned is also correct that the recommendation criteria include CPU, Memory, and Outbound Network utilization.
-Also how VM usage can be determined based on AVG metrics data - on one VM, I see CPU reaching 80% or more couple of times in a day but its AVG CPU utilization is very less?
Azure Advisor uses a combination of average and maximum values to determine VM usage. The metrics are sampled every 30 seconds, aggregated to 1 minute, and then further aggregated to 30 minutes (taking the max of average values while aggregating to 30 minutes). This means that Azure Advisor considers both the average and maximum CPU utilization of the VM over a 30-minute period to determine the VM usage.
In your example, if the CPU reaches 80% or more a couple of times in a day but the average CPU utilization is very low, it is possible that the high CPU utilization is occurring during peak usage periods. Azure Advisor takes this into account by considering the maximum CPU utilization over a 30-minute period, which would capture the peak usage periods.
I understand your concern about executing Azure Advisor VM Rightsizing recommendations based on average metrics utilization. While it is true that Azure Advisor uses average metrics utilization to generate recommendations, it also takes into account the maximum utilization over a 30-minute period. This means that Azure Advisor considers both the average and maximum CPU utilization of the VM over a 30-minute period to determine the VM usage.
Hope this clarifies.