-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Rust] Implement micro benchmarks for each operator #94
Comments
Comment from Andrew Lamb(alamb) @ 2021-04-26T12:32:40.877+0000: Migrated to github: https://github.com/apache/arrow-rs/issues/89 |
Hi, I'd like to explore this ticket, but I wonder how and where the benchmark should be run, and also what test workload each operator should be running against? |
Thanks @OscarTHZhang I think part of this ticket would be to define a reasonable test workload Here are some examples of benches that might server as inspiration:
Maybe the first thing to do is to take stock of the current coverage and propose some additions? |
Hi @alamb, Here are some questions up on my mind
I think we can divide the micro-bench into 2 types (as described above)
For all the aggregations, if we are going to implement them all, we can simply write the targeted SQL benchmarks. How does this sound? Anything missing? |
Hi @OscarTHZhang Thanks for commenting on this ticket.
I think the core goal for the ticket is to ensure the vast majority of the time is spent doing the operation rather than reading data. It might make sense to go through existing benchmarks and try to see what coverage we already have End to end benchmarks: https://github.com/apache/arrow-datafusion/tree/master/benchmarks more micro level benchmarks: There are already some benchmarks that appear to be Targeted SQL that you describe, for example https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/benches/sql_planner.rs and https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/benches/aggregate_query_sql.rs There are also some benchmarks for operators that are used as part of other operations, such as https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/benches/merge.rs |
Not sure how strong the suggestion of using Criterion was, but I recently discovered Divan. It may be worth evaluating.
(I have no affiliation; am just an aspiring OSS contributor browsing the good-first-issues 🙈) |
https://github.com/bheisler/iai could be a good fit for benchmarking those
I’m not sure if there are any caveats around using it to measure async-style Rust code, though. |
@alamb the way this issue title is phrased, it seems the right way to address is to extend the benchmarks which you shared here as micro-benchmarks. is that correct? |
@alamb Is this still issue something that would be liked? If so, I'd like a shot at it for my first issue. I think I could start with implementing some microbenchmarks for the physical plan operators? Such as: filter, limit, union, and the different types of joins to get started -- I didn't see any in the repo, although I may have missed them. Let me know your thoughts thanks! |
Hi @mnorfolk03 👋 -- thanks. I think since this ticket was filed, we have moved more into "end to end" type benchmarks like in https://github.com/apache/datafusion/tree/main/benchmarks I think Joins are an area we don't really have any great benchmarks -- we only have the TPCH queries The art of writing benchmarks is choosing what to benchmark I think, so it is often a bit hard to choose. Perhaps you could start with creating a benchmark for physical planning (aka the process of creating the final optimized ExecutionPlan) which is not an area we have a lot of coverage You could perhaps use the report on #12738 to create a planning benchmark in https://github.com/apache/datafusion/blob/main/datafusion/core/benches/sql_planner.rs ? |
Thanks I'll look into it and start working on it! |
Given the lack of specificity on this ticket (it tracks a basic idea rather than any particular project I think) I'll claim it is done for the moment I think a better approach is to add microbenchmarks for operators we are planning to improve |
Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-9551
We should implement criterion microbenchmarks for each operator so that we can test the impact of code changes on performance and catch regressions.
The text was updated successfully, but these errors were encountered: