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

Do not recycle Exemplars slices with a capacity > 10 #7936

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

pracucci
Copy link
Collaborator

What this PR does

We're dealing with an issue causing some ingesters memory to skyrocket. We believe the issue is caused by very few requests with an insane number of exemplars per series. When such requests are pooled, the TimeSeries.Exemplars slice put back into the pool will have a large capacity. Next requests will reuse the TimeSeries from the pool, keeping the large Exemplars slice allocated and in-use even if other requests don't have an huge number of exemplars. This go on and on, until many (if not all) requests in the pool have an huge Exemplars slice, causing the in-use heap to increase.

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

* Do not recycle Exemplars slices with a capacity > 10

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Fix linter

Signed-off-by: Marco Pracucci <marco@pracucci.com>

---------

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci marked this pull request as ready for review April 22, 2024 18:39
@pracucci pracucci requested a review from a team as a code owner April 22, 2024 18:39
@pracucci pracucci merged commit 1064c1a into main Apr 22, 2024
29 checks passed
@pracucci pracucci deleted the max-exemplars-in-the-pool-main branch April 22, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants