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

[r174] Ingester memory improvements by adjusting prealloc #4357

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

joe-elliott
Copy link
Member

Backport f71c4c6 from #4344


What this PR does:

Adjusts the use of prealloc for some nice memory improvements. Two adjustments were made:

  • Remove the use of prealloc for trace ids. We were alloc'ing 500 bytes for every trace id and never recouping them in the sync pool.
  • Change the traces pool to use linear buckets to reduce wasted allocs. In larger clusters millions of these slices are alloc'ed per second. We will have no problem with bucket collisions. Bucket size was tuned using an internal cluster and a metric was added to help diagnose future issues.

Seeing ~30% working set reduction in ingesters.

Checklist

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

* remove trace ids

Signed-off-by: Joe Elliott <number101010@gmail.com>

* linear buckets

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* tuney tune

Signed-off-by: Joe Elliott <number101010@gmail.com>

* metric misses and increase pool size

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
(cherry picked from commit f71c4c6)
@joe-elliott joe-elliott merged commit 074973b into r174 Nov 20, 2024
21 checks passed
@joe-elliott joe-elliott deleted the backport-4344-to-r174 branch November 20, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants