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

[target-allocator] Investigate Target Allocator memory usage #1257

Closed
jaronoff97 opened this issue Nov 16, 2022 · 1 comment · Fixed by #1293
Closed

[target-allocator] Investigate Target Allocator memory usage #1257

jaronoff97 opened this issue Nov 16, 2022 · 1 comment · Fixed by #1293
Assignees
Labels
area:target-allocator Issues for target-allocator

Comments

@jaronoff97
Copy link
Contributor

@seankhliao reported in the otel-operator channel in slack that the TA was using around 200 gigs of memory for 4k+ pods. This is definitely excessive and makes me think that we either have a memory leak and/or poor memory usage. I'm planning on going through the TA code, running some benchmarks/profiling, and doing some refactoring to improve the performance of the service.

@jaronoff97 jaronoff97 added the area:target-allocator Issues for target-allocator label Nov 16, 2022
@jaronoff97 jaronoff97 self-assigned this Nov 16, 2022
@seankhliao
Copy link
Contributor

I think most of what I experienced is in that slack thread.
Some additional info:

I think it's mostly from the map copies generated from TargetItems() in allocation. Running the allocator without clients doesn't produce the increasing memory usage profile.

I made some attempt at using sync.Pool and/or some rate limiting on TargetItems(), it only slowed but didn't prevent the runaway memory usage.

I ran with 10 collector instances with a 10s refresh interval (later reduced to 30s).

Setting GOMEMLIMIT did not prevent it from exceeding the soft memory limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:target-allocator Issues for target-allocator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants