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

Add h2o bench groupby queries #2881

Merged
merged 3 commits into from
Jul 13, 2022
Merged

Add h2o bench groupby queries #2881

merged 3 commits into from
Jul 13, 2022

Conversation

andygrove
Copy link
Member

Which issue does this PR close?

Closes #2879

Rationale for this change

I would like to make it easier to run h20 benchmarks

What changes are included in this PR?

Add h20 benchmark

Are there any user-facing changes?

No

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #2881 (76af3d4) into master (d0d5564) will increase coverage by 0.01%.
The diff coverage is 81.77%.

❗ Current head 76af3d4 differs from pull request most recent head 57c0cab. Consider uploading reports for the commit 57c0cab to get more accurate results

@@            Coverage Diff             @@
##           master    #2881      +/-   ##
==========================================
+ Coverage   85.25%   85.26%   +0.01%     
==========================================
  Files         275      277       +2     
  Lines       49010    49371     +361     
==========================================
+ Hits        41782    42095     +313     
- Misses       7228     7276      +48     
Impacted Files Coverage Δ
benchmarks/src/bin/h2o.rs 0.00% <0.00%> (ø)
datafusion/common/src/scalar.rs 75.77% <ø> (ø)
datafusion/core/tests/user_defined_plan.rs 87.79% <ø> (ø)
datafusion/expr/src/expr.rs 83.60% <0.00%> (-2.50%) ⬇️
datafusion/optimizer/src/optimizer.rs 75.00% <0.00%> (-13.24%) ⬇️
datafusion/optimizer/src/utils.rs 88.57% <ø> (ø)
datafusion/physical-expr/src/expressions/mod.rs 100.00% <ø> (ø)
...tafusion/physical-expr/src/expressions/datetime.rs 86.80% <89.44%> (+54.14%) ⬆️
datafusion/expr/src/logical_plan/plan.rs 76.57% <95.23%> (+2.02%) ⬆️
datafusion/core/src/execution/context.rs 78.82% <100.00%> (+0.02%) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0d5564...57c0cab. Read the comment docs.

let start = Instant::now();
let path = config.path.to_str().unwrap();
let ctx = SessionContext::new();
ctx.register_csv("x", path, CsvReadOptions::default())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The h2o abenchmark allows to read the data into memory (otherwise it would be mostly measuring the csv parser).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, the results were already looking pretty great but that would be even better, Do you have a link to where they mention this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nm, I see it now

Solutions are using in-memory data storage to achieve best timing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you found it. Some solutions also use specific (such as dictionary) encoding to get better results and lower memory usage.

The old PR for the rust solution is here:
h2oai/db-benchmark#182

This also includes some performance tweaks like changing the allocator, compile flags, prepartioning and batch size.

@andygrove
Copy link
Member Author

Reading from CSV

$ ../target/release/h2o group-by --query 1 --path /mnt/bigdata/h2oai/N_1e7_K_1e2_single.csv
Running benchmarks with the following options: GroupBy(GroupBy { query: 1, path: "/mnt/bigdata/h2oai/N_1e7_K_1e2_single.csv", debug: false, mem_table: false })
Executing select id1, sum(v1) as v1 from x group by id1
h2o groupby query 1 took 1793 ms

Reading from memory

$ ../target/release/h2o group-by --query 1 --path /mnt/bigdata/h2oai/N_1e7_K_1e2_single.csv --mem-table
Running benchmarks with the following options: GroupBy(GroupBy { query: 1, path: "/mnt/bigdata/h2oai/N_1e7_K_1e2_single.csv", debug: false, mem_table: true })
Executing select id1, sum(v1) as v1 from x group by id1
h2o groupby query 1 took 396 ms

@andygrove
Copy link
Member Author

@Dandandan This is ready for another review

@andygrove andygrove merged commit 6dc9dea into apache:master Jul 13, 2022
@andygrove andygrove deleted the h2o branch July 13, 2022 20:57
@ursabot
Copy link

ursabot commented Jul 13, 2022

Benchmark runs are scheduled for baseline = fd64e6f and contender = 6dc9dea. 6dc9dea is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add h2o benchmark
4 participants