Wrong/inacurate CPU usage data on Azure

MB 6 Reputation points
2022-03-17T07:42:06.483+00:00

Hi

It may be the wrong place to ask for it, but I am not sure where to go with this question.

Does anyone have an idea why Azure Virtual Machine "Monitoring" does not reflect real observed CPU usage? Here is what I can see on Azure VM Overview/Monitoring:
(~30% usage most of the time, one 77% peak)

184081-image.png

And here you can see how it looks like from inside of the VM (constant 100% CPU):

183927-image.png

Do you know how to see real data on the Azure GUI that the VM is 100% CPU all the time?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Stanislav Zhelyazkov 28,186 Reputation points MVP Volunteer Moderator
    2022-03-17T08:04:41.857+00:00

    Hi,
    From inside the VM you have probably opened a view that shows the cpu usage only on one of the cores. The graphic from Azure shows average CPU across all cores of the VM.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


  2. Stanislav Zhelyazkov 28,186 Reputation points MVP Volunteer Moderator
    2022-03-17T09:37:44.613+00:00

    As this is B-series VM it could be that you have exhausted your CPU credits and you do not have the full CPU capabilities . May be the [closest explanation for this you can find here1 as it shows example. Basically when you exhaust your credits CPU usage will be throttled from outside so from outside you will not see high CPU usage but from inside you will see it as the VM from inside it does not know it is throttled, the VM is using the CPU that is given to it from Azure. The only way Azure can control how much CPU is used by setting the limit from outside so the VM does not know that is throttled. You can check metric CPU credits remaining for the VM and see if it is 0 or around 0.

    Update: Do not worry. The graph is reflecting the reality but the CPU is seen from the Hyper-V host on the VM. Of course from inside the usage is different. Of course this kind of behavior is only applicable for such kind of VMs. If you want you can enable monitoring within the guest via data collection rules. That way you will have capability to monitor from inside as well.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.