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

Improve memory usage of StepBucketHistogram #4954

Closed
lenin-jaganathan opened this issue Apr 9, 2024 · 3 comments · Fixed by #4955
Closed

Improve memory usage of StepBucketHistogram #4954

lenin-jaganathan opened this issue Apr 9, 2024 · 3 comments · Fixed by #4955
Labels
enhancement A general enhancement performance Issues related to general performance
Milestone

Comments

@lenin-jaganathan
Copy link
Contributor

While configuring Histograms the expectation is that 16 bytes would be used per bucket (8 bytes - for bucket bound, 8 bytes - for a count of values at a bound). But it seems using StepBucketHistogram (also TimeWindowFixedBoundaryHistogram) uses 8 additional bytes in addition to the required bytes. This is because these implementations seem to hold a local copy of buckets which costs for additional memory footprint.

Expected Behaviour:
Histogram only uses (2 * 8) bytes per bucket.

shakuzen pushed a commit that referenced this issue Oct 7, 2024
A FixedBoundaryHistogram is used by StepBucketHistogram, so there is no need for StepBucketHistogram to maintain a field of the buckets itself. This changes to get the buckets from the underlying FixedBoundaryHistogram when needed.

See gh-4954
@shakuzen
Copy link
Member

Following up on #4955 (comment), @lenin-jaganathan is there anything left to do for this issue, or is it taken care of by #4955?

@shakuzen shakuzen added enhancement A general enhancement performance Issues related to general performance and removed waiting-for-triage labels Oct 10, 2024
@shakuzen shakuzen added this to the 1.12.11 milestone Oct 10, 2024
@shakuzen shakuzen added the waiting for feedback We need additional information before we can continue label Oct 10, 2024
@lenin-jaganathan
Copy link
Contributor Author

I missed the comment. Will have a look and update.

@lenin-jaganathan
Copy link
Contributor Author

We are good. Resolved by #4955

@shakuzen shakuzen removed the waiting for feedback We need additional information before we can continue label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement performance Issues related to general performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants