-
Notifications
You must be signed in to change notification settings - Fork 529
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
Streaming PromQL engine benchmark tooling #7849
Streaming PromQL engine benchmark tooling #7849
Conversation
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 work! I agree on the value of running the benchmarks against ingester and Mimir (distributor) queryable. We get a benchmark closer to the actual Mimir utilization and will help to spot if we're missing anything (e.g. we expect an optimization to trigger, but we don't see the impact on benchmark).
That being said, I'm not a big fan of tools/benchmark-query-engine/
because it partially re-implements go test
. However, I don't know how to reliably capture the memory peak utilization in a different way (I thought about profiling, but I think it will not work for our purpose and, even if so, may be even more complicated that you did). All in all, I think it's good enough and we should move on ;)
What this PR does
This PR adds a tool to capture peak memory utilisation of the PromQL engine benchmarks added in #7693.
It also refactors the benchmarks to use a Mimir ingester rather than a TSDB directly. This makes it possible to run the benchmarks with the ingester out-of-process. This is more representative of how the query engine will be used in the real world.
The
benchmark-query-engine
tool takes advantage of this to run the ingester in its process, and run the benchmark in a separate process, ensuring that the peak memory utilisation recorded bybenchmark-query-engine
does not include memory used by the ingester. It captures the peak RSS of the benchmark process and reports this as the peak memory utilisation of the benchmark. There's more details aboutbenchmark-query-engine
in the readme.It produces output like the following, allowing it to be used with tools like
benchstat
, as well as the engine benchmark comparison script:Full benchmark results
I've also modified the number of histogram buckets created for each test series to make benchmark setup faster.
Notes to reviewers:
go test ...
without any other preparation (eg. building binaries or Docker images)Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.