Azure Monitor Agent for Linux is bloatware

Samuli K 0 Reputation points
2025-02-18T12:56:24.7466667+00:00

Hello Azure community,

For the past 2-3 weeks I have been getting CPU and memory alerts for VMs which have been stable for years. Looking into the problem, it was always Azure Monitor Agent or one the Azure extensions causing the spike in load. It's especially bad with B-family VMs as they will basically be dead in matter of minutes due to credits being exhausted. I had no option except to resize the VMs to avoid the problem.

Here are the processes, from top to bottom, using resident memory:

3089 0.0 1.1 105596 21052 0:00 /usr/bin/python3

3084 0.0 1.2 106948 23244 0:05 /usr/bin/python3

2601 0.0 1.3 39052 25884 0:00 /usr/bin/python3

5019 0.0 1.6 1162016 31772 0:15 /opt/microsoft/azuremonitoragent/bin/telegraf

2781 0.1 1.7 336844 32496 1:16 /usr/bin/python3

1542 0.0 1.8 103464 34516 0:02 /usr/sbin/httpd-prefork

1513 0.0 1.8 440904 34608 1:00 /usr/bin/python3

23301 0.0 1.9 112840 36112 0:00 /usr/sbin/httpd-prefork

728 0.0 2.0 1133284 38952 0:17 /opt/microsoft/azuremonitoragent/bin/agentlauncher

11732 0.0 2.1 117132 40788 0:00 /usr/sbin/httpd-prefork

1563 0.0 4.4 961556 84960 0:18 /usr/sbin/mysqld

729 0.0 4.4 1263428 85112 0:23 /opt/microsoft/azuremonitoragent/bin/amacoreagent

3238 0.0 5.3 796476 100572 0:33 /opt/microsoft/azuremonitoragent/bin/mdsd

That's 100 + 80 + 40 + 30 = 250 MB of resident memory plus all the python3 processes. That is more resident memory than Apache and Mysql combined.

Maybe it is time to improve the code?

If this cannot be solved, I will remove the Azure extensions and uninstall related packages.

Please do not waste my time by telling me to create a supoort ticket. I will never pay for a support plan, I'm doing Microsoft a favor by reporting problems in their solutions.

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,478 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,387 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rahul Podila 1,825 Reputation points Microsoft Vendor
    2025-02-19T07:36:40.8533333+00:00

    Hi @Samuli K

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    It looks like your Azure VMs are using too much CPU and memory because of the Azure Monitor Agent and its processes. This can happen often with certain VM types like the B-series, which are meant for light workloads and can run out of resources quickly when there's a lot of demand.

    1. Update Everything: The Azure Monitor Agent and its extensions are up to date. Updates may improve performance and reduce resource usage.
    2. Check Resource Usage: Use tools like Perfmon or Azure's monitoring to see which processes are using the most resources. This will help you see if the Azure Monitor Agent is the main issue.
    3. Try Other Monitoring Tools: If the agent still causes problems, you can look into other monitoring solutions that use fewer resources.
    4. Resize Your VMs: You've already resized your VMs, which can help with the immediate problem, but it won't fix the agent itself.
    5. Give Feedback: If you're still having trouble, you can give feedback to Microsoft to help improve their services, even if you don’t open a support ticket.
    6. Remove Extensions: As a last resort, you might need to remove the Azure extensions if the issue is still serious.

    If you have any concerns, please go through this link: -

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/azure-windows-vm-memory-issue#troubleshoot-memory-pressure-issues

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-high-cpu-issues-azure-windows-vm#summary

    If you have any further queries, do let us know


    If the answer is helpful, please click "Accept Answer" and "Upvote it"


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.