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

[r175] Ingester memory improvements by adjusting prealloc #4348

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

github-actions[bot]
Copy link
Contributor

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
Copy link
Member

Realizing this is not necessary. the backport will happen in GET

@joe-elliott joe-elliott reopened this Nov 19, 2024
@joe-elliott joe-elliott merged commit 28869eb into r175 Nov 19, 2024
5 checks passed
@joe-elliott joe-elliott deleted the backport-4344-to-r175 branch November 19, 2024 22:10
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.

1 participant