Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] trace-agent consuming more memory on average since 7.61.0 #33015

Open
relu opened this issue Jan 16, 2025 · 4 comments
Open

[BUG] trace-agent consuming more memory on average since 7.61.0 #33015

relu opened this issue Jan 16, 2025 · 4 comments
Assignees

Comments

@relu
Copy link

relu commented Jan 16, 2025

Agent Environment

# agent version
Agent 7.61.0 - Commit: 202f54bcf5 - Serialization version: v5.0.137 - Go version: go1.22.8

Describe what happened:

Observing higher average memory utilization for the trace-agent after upgrading to v7.61.0.

Describe what you expected:

Average memory utilization should not have increased after the upgrade.

Steps to reproduce the issue:

Observe the memory utilization metrics before and after upgrading to 7.61.0

Additional environment details (Operating System, Cloud provider, etc):

Datadog Agent running on AWS EKS, Kubernetes v1.31.1, Cilium v1.16.4.

Image

@github-actions github-actions bot added the team/agent-apm trace-agent label Jan 16, 2025
@ajgajg1134
Copy link
Contributor

Hello! Thanks for opening this ticket, can you open a support ticket here? This will give us a lot more visibility into other metrics, grab agent flares etc so we can narrow down exactly the cause of the memory increase here.

@ajgajg1134 ajgajg1134 self-assigned this Jan 16, 2025
@ajgajg1134
Copy link
Contributor

Ahh sorry for directing you to the support endpoint so quickly but I believe I've found a likely culprit:

Enables a cache for SQL and MongoDB obfuscation. This cache is enabled by default but can be disabled by setting apm_config.obfuscation.cache.enabled to false.

This feature can significantly improve the throughput of the trace-agent by reducing the CPU cost of obfuscating SQL and MongoDB queries however it does add a bit of additional memory overhead. I still recommend opening a support ticket so we can confirm for sure if this is the issue.

If you don't want the memory overhead / you aren't seeing CPU improvements or throughput improvements (which is possible depending on your exact workload) you can disable the cache using apm_config.obfuscation.cache.enabled.

@relu
Copy link
Author

relu commented Jan 20, 2025

Thank you @ajgajg1134, that sounds like a reasonable explanation and given the information I suspect this would have been an expected outcome so not really a bug. I will check to see if the respective setting will affect the memory utilization.

@relu
Copy link
Author

relu commented Jan 20, 2025

Image

Image

As you can see, there doesn't appear to be any visible positive impact on CPU utilization (average), thus it might make sense for us to disable the setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants