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

bench: compare block and stream compression #174

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

MrCroxx
Copy link
Owner

@MrCroxx MrCroxx commented Jun 8, 2022

What changes were proposed in this pull request?

Introduce benchmark for comparing block and stream compression. With stream compression, compressed block size can be better aligned.

Results:

buffer - vsize: 8B/     time:   [2.1603 us 2.1619 us 2.1634 us]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe

block compression - vsize: 8B/
                        time:   [124.39 us 124.45 us 124.51 us]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

stream compression - vsize: 8B/
                        time:   [185.69 us 185.79 us 185.89 us]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

uncompressed size: 20000
block compressed size: 11887, rate: 0.594
stream compressed size: 11887, rate: 0.594
buffer - vsize: 16B/    time:   [2.8762 us 2.8778 us 2.8794 us]
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild

block compression - vsize: 16B/
                        time:   [209.27 us 209.49 us 209.82 us]
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe

stream compression - vsize: 16B/
                        time:   [270.70 us 270.93 us 271.20 us]
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe

uncompressed size: 28000
block compressed size: 20877, rate: 0.746
stream compressed size: 20877, rate: 0.746
buffer - vsize: 32B/    time:   [3.6046 us 3.6098 us 3.6161 us]
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) high mild
  4 (4.00%) high severe

block compression - vsize: 32B/
                        time:   [427.75 us 427.92 us 428.09 us]
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe

stream compression - vsize: 32B/
                        time:   [487.72 us 487.95 us 488.23 us]
Found 4 outliers among 100 measurements (4.00%)
  2 (2.00%) high mild
  2 (2.00%) high severe

uncompressed size: 44000
block compressed size: 36889, rate: 0.838
stream compressed size: 36889, rate: 0.838
buffer - vsize: 64B/    time:   [5.4895 us 5.4917 us 5.4941 us]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

block compression - vsize: 64B/
                        time:   [977.45 us 977.77 us 978.11 us]
Found 10 outliers among 100 measurements (10.00%)
  6 (6.00%) high mild
  4 (4.00%) high severe

Benchmarking stream compression - vsize: 64B/: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.3s, enable flat sampling, or reduce sample count to 60.
stream compression - vsize: 64B/
                        time:   [1.0419 ms 1.0425 ms 1.0432 ms]
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe

uncompressed size: 76000
block compressed size: 68900, rate: 0.907
stream compressed size: 68900, rate: 0.907

Which issues is this PR related to?

#171

@MrCroxx MrCroxx added the test Testing. label Jun 8, 2022
@MrCroxx MrCroxx self-assigned this Jun 8, 2022
@MrCroxx MrCroxx enabled auto-merge (squash) June 8, 2022 13:43
@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #174 (9d10f36) into main (3e6018c) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #174      +/-   ##
==========================================
- Coverage   84.03%   83.99%   -0.05%     
==========================================
  Files          90       90              
  Lines        9028     9028              
==========================================
- Hits         7587     7583       -4     
- Misses       1441     1445       +4     
Impacted Files Coverage Δ
wheel/src/worker/sstable_uploader.rs 76.85% <0.00%> (-1.66%) ⬇️
wheel/src/components/raft_log_store.rs 67.08% <0.00%> (-0.64%) ⬇️
storage/src/raft_log_store/store.rs 92.47% <0.00%> (-0.24%) ⬇️

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 3e6018c...9d10f36. Read the comment docs.

@MrCroxx MrCroxx merged commit 0770ce4 into main Jun 8, 2022
@MrCroxx MrCroxx deleted the xx/bench-stream-compression branch June 8, 2022 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant