-
Notifications
You must be signed in to change notification settings - Fork 544
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
Mimir query engine: avoid copying native histograms where possible #8677
Conversation
ac35ff2
to
8ac0155
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice stuff. I think this makes sense to me. Some more tests would be good, but otherwise I think we should proceed with this approach.
8ac0155
to
962d549
Compare
…t vector selectors, and in sum aggregations if we can
5d61f05
to
3275480
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just some nits/queries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
What this PR does
This PR improves the performance of queries over native histograms in MQE. It does this by avoiding creating copies of
FloatHistogram
s where possible.This improves query latency for queries over native histograms in MQE by up to 20%. This has no noticeable impact on queries over only floats, and makes MQE up to 50% faster than Prometheus' engine in some cases.
For example, previously, while evaluating a
sum
over native histograms, we would always copyFloatHistogram
instances that were the first value for an output group. However, this is not necessary: we only need to make a copy if the sameFloatHistogram
will be used as the first value for subsequent points.Performance comparison of this PR vs Prometheus' engine
Performance comparison of
main
vs this PRPeak memory consumption is unchanged within the margin of error for the benchmarks.
Which issue(s) this PR fixes or relates to
Fixes #8360 (comment)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.