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

add pool for expanded posting slice #8035

Merged
merged 2 commits into from
Jan 5, 2025

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Jan 3, 2025

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

We pre-allocate the posting slice with default size 1024 when expanding postings. Under high QPS to store gateway, this allocation can be quite a lot. We are able to see about 10% to 20% of allocation on this from alloc profile.

Use a pool for []storage.SeriesRef and reclaim the posting slice when the request lifecycle ends and closes the index header.

Verification

Copy link
Contributor

@pedro-stanaka pedro-stanaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Signed-off-by: Ben Ye <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 3, 2025
Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@saswatamcode saswatamcode merged commit 07734b9 into thanos-io:main Jan 5, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants