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

metrics: speed up bucket lookups for histogram insertions #138933

Closed
dhartunian opened this issue Jan 13, 2025 · 0 comments
Closed

metrics: speed up bucket lookups for histogram insertions #138933

dhartunian opened this issue Jan 13, 2025 · 0 comments
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-observability

Comments

@dhartunian
Copy link
Collaborator

dhartunian commented Jan 13, 2025

Currently, the code used for bucket lookups during histogram insertions can be slow due to a binary search.

Once the library is copied over to our repository, we should see whether additional gains can be made by modifying the bucket lookup code to suit our particular use case.

There was a recent change merged which uses a linear search for smaller histograms prometheus/client_golang#1673. We should evaluate whether this change results in a performance gain for our use case as well, and see if linear lookup on our bucket layouts is reliably faster than binary search.

Jira issue: CRDB-46435

@dhartunian dhartunian added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-observability labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-observability
Projects
None yet
Development

No branches or pull requests

1 participant