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

feat: Use isahc to replace hyper #471

Merged
merged 11 commits into from
Aug 5, 2022
Merged

feat: Use isahc to replace hyper #471

merged 11 commits into from
Aug 5, 2022

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Jul 26, 2022

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

This PR is a demo of using isahc to replace hyper.

Conclusion:

  • isahc uses the same request struct with hyper, making migration easier.
  • isahc's ResponseFuture has a lifetime. We have to Box::pin again. (Can we improve?)
  • All tests passed (isahc is OK to use for opendal)
  • Benchmark seems a bit slow (not sure if related to runtime)

Tested via local hosted minio on NVMe SSD:

isahc Bench:

     Running benches/ops/main.rs (target/release/deps/ops-6744f7d05af32671)
fs not set, ignore
read_full/4.00 KiB      time:   [439.45 us 452.16 us 463.65 us]
                        thrpt:  [8.4250 MiB/s 8.6391 MiB/s 8.8889 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_full/256 KiB: Collecting 100 samples in estimated 6.2662 s (10k iter                                                                                      read_full/256 KiB       time:   [522.37 us 551.01 us 578.93 us]
                        thrpt:  [431.83 MiB/s 453.71 MiB/s 478.59 MiB/s]
Benchmarking read_full/4.00 MiB: Collecting 100 samples in estimated 5.0795 s (2200 it                                                                                      read_full/4.00 MiB      time:   [2.3599 ms 2.3756 ms 2.3911 ms]
                        thrpt:  [1.6336 GiB/s 1.6443 GiB/s 1.6552 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_full/16.0 MiB: Collecting 100 samples in estimated 5.6395 s (700 ite                                                                                      read_full/16.0 MiB      time:   [8.0177 ms 8.0603 ms 8.1053 ms]
                        thrpt:  [1.9277 GiB/s 1.9385 GiB/s 1.9488 GiB/s]
Found 38 outliers among 100 measurements (38.00%)
  18 (18.00%) low mild
  10 (10.00%) high mild
  10 (10.00%) high severe

Benchmarking read_part/4.00 KiB: Collecting 100 samples in estimated 5.3691 s (10k ite                                                                                      read_part/4.00 KiB      time:   [495.75 us 502.35 us 508.68 us]
                        thrpt:  [7.6792 MiB/s 7.7760 MiB/s 7.8795 MiB/s]
Benchmarking read_part/256 KiB: Collecting 100 samples in estimated 6.4145 s (10k iter                                                                                      read_part/256 KiB       time:   [546.33 us 572.42 us 600.28 us]
                        thrpt:  [416.47 MiB/s 436.74 MiB/s 457.60 MiB/s]
Found 9 outliers among 100 measurements (9.00%)
  9 (9.00%) low mild
Benchmarking read_part/4.00 MiB: Collecting 100 samples in estimated 5.0048 s (2100 it                                                                                      read_part/4.00 MiB      time:   [3.1035 ms 3.1304 ms 3.1580 ms]
                        thrpt:  [1.2369 GiB/s 1.2478 GiB/s 1.2586 GiB/s]
Benchmarking read_part/16.0 MiB: Collecting 100 samples in estimated 5.8409 s (600 ite                                                                                      read_part/16.0 MiB      time:   [10.199 ms 10.379 ms 10.558 ms]
                        thrpt:  [1.4799 GiB/s 1.5055 GiB/s 1.5320 GiB/s]

Benchmarking read_parallel/1x4.00 KiB: Collecting 100 samples in estimated 7.3937 s (1                                                                                      read_parallel/1x4.00 KiB
                        time:   [466.93 us 475.74 us 484.27 us]
                        thrpt:  [8.0663 MiB/s 8.2109 MiB/s 8.3658 MiB/s]
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) low mild
Benchmarking read_parallel/2x4.00 KiB: Collecting 100 samples in estimated 5.1543 s (1                                                                                      read_parallel/2x4.00 KiB
                        time:   [498.55 us 514.86 us 529.92 us]
                        thrpt:  [14.743 MiB/s 15.174 MiB/s 15.670 MiB/s]
Benchmarking read_parallel/4x4.00 KiB: Collecting 100 samples in estimated 5.6615 s (1                                                                                      read_parallel/4x4.00 KiB
                        time:   [524.40 us 537.37 us 550.92 us]
                        thrpt:  [28.362 MiB/s 29.077 MiB/s 29.796 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_parallel/8x4.00 KiB: Collecting 100 samples in estimated 6.6902 s (1                                                                                      read_parallel/8x4.00 KiB
                        time:   [645.51 us 658.73 us 672.32 us]
                        thrpt:  [46.481 MiB/s 47.440 MiB/s 48.411 MiB/s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
Benchmarking read_parallel/16x4.00 KiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.2s, enable flat sampling, or reduce sample count to 60.
Benchmarking read_parallel/16x4.00 KiB: Collecting 100 samples in estimated 5.1923 s (                                                                                      read_parallel/16x4.00 KiB
                        time:   [958.84 us 981.99 us 1.0058 ms]
                        thrpt:  [62.138 MiB/s 63.646 MiB/s 65.183 MiB/s]
Benchmarking read_parallel/1x256 KiB: Collecting 100 samples in estimated 7.0926 s (10                                                                                      read_parallel/1x256 KiB time:   [732.04 us 753.06 us 773.30 us]
                        thrpt:  [323.29 MiB/s 331.98 MiB/s 341.51 MiB/s]
Found 8 outliers among 100 measurements (8.00%)
  3 (3.00%) low mild
  4 (4.00%) high mild
  1 (1.00%) high severe
Benchmarking read_parallel/2x256 KiB: Collecting 100 samples in estimated 7.5281 s (10                                                                                      read_parallel/2x256 KiB time:   [724.62 us 750.16 us 778.31 us]
                        thrpt:  [642.42 MiB/s 666.53 MiB/s 690.01 MiB/s]
Benchmarking read_parallel/4x256 KiB: Collecting 100 samples in estimated 9.3891 s (10                                                                                      read_parallel/4x256 KiB time:   [875.97 us 895.56 us 916.19 us]
                        thrpt:  [1.0659 GiB/s 1.0904 GiB/s 1.1148 GiB/s]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_parallel/8x256 KiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 7.0s, enable flat sampling, or reduce sample count to 50.
Benchmarking read_parallel/8x256 KiB: Collecting 100 samples in estimated 7.0137 s (50                                                                                      read_parallel/8x256 KiB time:   [1.3985 ms 1.4325 ms 1.4631 ms]
                        thrpt:  [1.3349 GiB/s 1.3634 GiB/s 1.3966 GiB/s]
Benchmarking read_parallel/16x256 KiB: Collecting 100 samples in estimated 5.1749 s (2                                                                                      read_parallel/16x256 KiB
                        time:   [2.1667 ms 2.2184 ms 2.2723 ms]
                        thrpt:  [1.7191 GiB/s 1.7608 GiB/s 1.8029 GiB/s]
Benchmarking read_parallel/1x4.00 MiB: Collecting 100 samples in estimated 5.0887 s (1                                                                                      read_parallel/1x4.00 MiB
                        time:   [3.1645 ms 3.2070 ms 3.2519 ms]
                        thrpt:  [1.2012 GiB/s 1.2180 GiB/s 1.2344 GiB/s]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
Benchmarking read_parallel/2x4.00 MiB: Collecting 100 samples in estimated 5.4133 s (1                                                                                      read_parallel/2x4.00 MiB
                        time:   [4.8317 ms 4.8898 ms 4.9526 ms]
                        thrpt:  [1.5775 GiB/s 1.5977 GiB/s 1.6169 GiB/s]
Found 8 outliers among 100 measurements (8.00%)
  8 (8.00%) high mild
Benchmarking read_parallel/4x4.00 MiB: Collecting 100 samples in estimated 5.2386 s (5                                                                                      read_parallel/4x4.00 MiB
                        time:   [9.9052 ms 9.9783 ms 10.050 ms]
                        thrpt:  [1.5547 GiB/s 1.5659 GiB/s 1.5775 GiB/s]
Found 5 outliers among 100 measurements (5.00%)
  4 (4.00%) low mild
  1 (1.00%) high mild
Benchmarking read_parallel/8x4.00 MiB: Collecting 100 samples in estimated 6.1177 s (2                                                                                      read_parallel/8x4.00 MiB
                        time:   [29.730 ms 29.853 ms 29.980 ms]
                        thrpt:  [1.0424 GiB/s 1.0468 GiB/s 1.0511 GiB/s]
Benchmarking read_parallel/16x4.00 MiB: Collecting 100 samples in estimated 7.1522 s (                                                                                      read_parallel/16x4.00 MiB
                        time:   [29.877 ms 30.356 ms 30.851 ms]
                        thrpt:  [2.0258 GiB/s 2.0589 GiB/s 2.0919 GiB/s]
Benchmarking read_parallel/1x16.0 MiB: Collecting 100 samples in estimated 5.2187 s (7                                                                                      read_parallel/1x16.0 MiB
                        time:   [7.8764 ms 7.9292 ms 7.9798 ms]
                        thrpt:  [1.9581 GiB/s 1.9706 GiB/s 1.9838 GiB/s]
Found 12 outliers among 100 measurements (12.00%)
  12 (12.00%) low mild
Benchmarking read_parallel/2x16.0 MiB: Collecting 100 samples in estimated 6.4420 s (4                                                                                      read_parallel/2x16.0 MiB
                        time:   [15.509 ms 15.573 ms 15.653 ms]
                        thrpt:  [1.9964 GiB/s 2.0067 GiB/s 2.0149 GiB/s]
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe
Benchmarking read_parallel/4x16.0 MiB: Collecting 100 samples in estimated 6.7507 s (2                                                                                      read_parallel/4x16.0 MiB
                        time:   [31.874 ms 32.127 ms 32.371 ms]
                        thrpt:  [1.9307 GiB/s 1.9454 GiB/s 1.9608 GiB/s]
Found 9 outliers among 100 measurements (9.00%)
  1 (1.00%) low severe
  7 (7.00%) low mild
  1 (1.00%) high mild
Benchmarking read_parallel/8x16.0 MiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 7.2s, or reduce sample count to 60.
Benchmarking read_parallel/8x16.0 MiB: Collecting 100 samples in estimated 7.1595 s (1                                                                                      read_parallel/8x16.0 MiB
                        time:   [71.410 ms 72.214 ms 73.032 ms]
                        thrpt:  [1.7116 GiB/s 1.7310 GiB/s 1.7504 GiB/s]
Benchmarking read_parallel/16x16.0 MiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 15.1s, or reduce sample count to 30.
Benchmarking read_parallel/16x16.0 MiB: Collecting 100 samples in estimated 15.051 s (                                                                                      read_parallel/16x16.0 MiB
                        time:   [149.86 ms 150.95 ms 152.00 ms]
                        thrpt:  [1.6447 GiB/s 1.6561 GiB/s 1.6682 GiB/s]

hyper Bench:

     Running benches/ops/main.rs (target/release/deps/ops-007d141f12c112b4)
fs not set, ignore
Benchmarking read_full/4.00 KiB: Collecting 100 samples in estimated 6.4148 s (15k ite                                                                                      read_full/4.00 KiB      time:   [435.02 us 446.16 us 455.58 us]
                        thrpt:  [8.5742 MiB/s 8.7553 MiB/s 8.9796 MiB/s]
                 change:
                        time:   [-1.9751% +0.5463% +2.9684%] (p = 0.66 > 0.05)
                        thrpt:  [-2.8828% -0.5434% +2.0149%]
                        No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild
Benchmarking read_full/256 KiB: Collecting 100 samples in estimated 5.3180 s (10k iter                                                                                      read_full/256 KiB       time:   [521.09 us 530.15 us 538.75 us]
                        thrpt:  [464.04 MiB/s 471.56 MiB/s 479.76 MiB/s]
                 change:
                        time:   [-5.0167% -1.6002% +2.0537%] (p = 0.39 > 0.05)
                        thrpt:  [-2.0123% +1.6262% +5.2817%]
                        No change in performance detected.
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) low mild
  1 (1.00%) high mild
Benchmarking read_full/4.00 MiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.5s, enable flat sampling, or reduce sample count to 50.
Benchmarking read_full/4.00 MiB: Collecting 100 samples in estimated 8.4760 s (5050 it                                                                                      read_full/4.00 MiB      time:   [1.7376 ms 1.7879 ms 1.8336 ms]
                        thrpt:  [2.1304 GiB/s 2.1849 GiB/s 2.2480 GiB/s]
                 change:
                        time:   [-29.687% -27.989% -26.582%] (p = 0.00 < 0.05)
                        thrpt:  [+36.206% +38.868% +42.221%]
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_full/16.0 MiB: Collecting 100 samples in estimated 5.0452 s (800 ite                                                                                      read_full/16.0 MiB      time:   [6.6515 ms 6.6922 ms 6.7314 ms]
                        thrpt:  [2.3212 GiB/s 2.3348 GiB/s 2.3491 GiB/s]
                 change:
                        time:   [-17.683% -16.974% -16.333%] (p = 0.00 < 0.05)
                        thrpt:  [+19.522% +20.444% +21.482%]
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  1 (1.00%) low severe
  5 (5.00%) low mild
  2 (2.00%) high mild

Benchmarking read_part/4.00 KiB: Collecting 100 samples in estimated 7.0755 s (15k ite                                                                                      read_part/4.00 KiB      time:   [423.09 us 432.51 us 442.86 us]
                        thrpt:  [8.8205 MiB/s 9.0316 MiB/s 9.2327 MiB/s]
                 change:
                        time:   [-12.393% -10.363% -8.3506%] (p = 0.00 < 0.05)
                        thrpt:  [+9.1115% +11.561% +14.146%]
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_part/256 KiB: Collecting 100 samples in estimated 5.3864 s (10k iter                                                                                      read_part/256 KiB       time:   [532.02 us 547.40 us 562.43 us]
                        thrpt:  [444.50 MiB/s 456.70 MiB/s 469.91 MiB/s]
                 change:
                        time:   [-15.617% -12.758% -9.9140%] (p = 0.00 < 0.05)
                        thrpt:  [+11.005% +14.624% +18.507%]
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild
Benchmarking read_part/4.00 MiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.2s, enable flat sampling, or reduce sample count to 50.
Benchmarking read_part/4.00 MiB: Collecting 100 samples in estimated 8.1812 s (5050 it                                                                                      read_part/4.00 MiB      time:   [2.3972 ms 2.4561 ms 2.5151 ms]
                        thrpt:  [1.5531 GiB/s 1.5904 GiB/s 1.6295 GiB/s]
                 change:
                        time:   [-25.135% -23.573% -21.904%] (p = 0.00 < 0.05)
                        thrpt:  [+28.047% +30.844% +33.574%]
                        Performance has improved.
Benchmarking read_part/16.0 MiB: Collecting 100 samples in estimated 5.4768 s (700 ite                                                                                      read_part/16.0 MiB      time:   [7.6206 ms 7.8073 ms 7.9989 ms]
                        thrpt:  [1.9534 GiB/s 2.0013 GiB/s 2.0504 GiB/s]
                 change:
                        time:   [-26.900% -24.776% -22.533%] (p = 0.00 < 0.05)
                        thrpt:  [+29.087% +32.936% +36.799%]
                        Performance has improved.

Benchmarking read_parallel/1x4.00 KiB: Collecting 100 samples in estimated 6.8590 s (1                                                                                      read_parallel/1x4.00 KiB
                        time:   [449.90 us 459.22 us 467.90 us]
                        thrpt:  [8.3485 MiB/s 8.5062 MiB/s 8.6825 MiB/s]
                 change:
                        time:   [-9.8321% -7.5507% -5.2921%] (p = 0.00 < 0.05)
                        thrpt:  [+5.5879% +8.1674% +10.904%]
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) low mild
Benchmarking read_parallel/2x4.00 KiB: Collecting 100 samples in estimated 6.9238 s (1                                                                                      read_parallel/2x4.00 KiB
                        time:   [446.24 us 460.21 us 473.78 us]
                        thrpt:  [16.490 MiB/s 16.976 MiB/s 17.508 MiB/s]
                 change:
                        time:   [-2.5059% +1.1108% +4.7975%] (p = 0.57 > 0.05)
                        thrpt:  [-4.5779% -1.0986% +2.5703%]
                        No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_parallel/4x4.00 KiB: Collecting 100 samples in estimated 6.8401 s (1                                                                                      read_parallel/4x4.00 KiB
                        time:   [475.97 us 487.54 us 499.50 us]
                        thrpt:  [31.281 MiB/s 32.049 MiB/s 32.827 MiB/s]
                 change:
                        time:   [-7.9947% -5.0357% -1.8789%] (p = 0.00 < 0.05)
                        thrpt:  [+1.9149% +5.3027% +8.6894%]
                        Performance has improved.
Benchmarking read_parallel/8x4.00 KiB: Collecting 100 samples in estimated 5.8168 s (1                                                                                      read_parallel/8x4.00 KiB
                        time:   [564.21 us 572.37 us 580.81 us]
                        thrpt:  [53.804 MiB/s 54.598 MiB/s 55.387 MiB/s]
                 change:
                        time:   [-17.526% -15.490% -13.489%] (p = 0.00 < 0.05)
                        thrpt:  [+15.592% +18.330% +21.250%]
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  1 (1.00%) low mild
  5 (5.00%) high mild
Benchmarking read_parallel/16x4.00 KiB: Collecting 100 samples in estimated 7.5080 s (                                                                                      read_parallel/16x4.00 KiB
                        time:   [754.86 us 762.43 us 769.80 us]
                        thrpt:  [81.190 MiB/s 81.974 MiB/s 82.796 MiB/s]
                 change:
                        time:   [-25.524% -24.096% -22.617%] (p = 0.00 < 0.05)
                        thrpt:  [+29.227% +31.745% +34.271%]
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
Benchmarking read_parallel/1x256 KiB: Collecting 100 samples in estimated 6.3430 s (10                                                                                      read_parallel/1x256 KiB time:   [643.59 us 651.30 us 658.88 us]
                        thrpt:  [379.43 MiB/s 383.85 MiB/s 388.44 MiB/s]
                 change:
                        time:   [-15.879% -14.108% -12.312%] (p = 0.00 < 0.05)
                        thrpt:  [+14.041% +16.426% +18.876%]
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) low mild
  2 (2.00%) high mild
Benchmarking read_parallel/2x256 KiB: Collecting 100 samples in estimated 7.6232 s (10                                                                                      read_parallel/2x256 KiB time:   [757.20 us 766.70 us 776.51 us]
                        thrpt:  [643.91 MiB/s 652.14 MiB/s 660.32 MiB/s]
                 change:
                        time:   [-4.5143% -1.7149% +1.1064%] (p = 0.24 > 0.05)
                        thrpt:  [-1.0943% +1.7448% +4.7277%]
                        No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) low mild
  3 (3.00%) high mild
Benchmarking read_parallel/4x256 KiB: Collecting 100 samples in estimated 7.6263 s (10                                                                                      read_parallel/4x256 KiB time:   [796.20 us 814.43 us 832.06 us]
                        thrpt:  [1.1737 GiB/s 1.1991 GiB/s 1.2265 GiB/s]
                 change:
                        time:   [-10.185% -7.5477% -4.5669%] (p = 0.00 < 0.05)
                        thrpt:  [+4.7854% +8.1639% +11.341%]
                        Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
Benchmarking read_parallel/8x256 KiB: Collecting 100 samples in estimated 9.3976 s (10                                                                                      read_parallel/8x256 KiB time:   [925.48 us 938.59 us 951.83 us]
                        thrpt:  [2.0520 GiB/s 2.0809 GiB/s 2.1104 GiB/s]
                 change:
                        time:   [-33.037% -31.705% -30.318%] (p = 0.00 < 0.05)
                        thrpt:  [+43.509% +46.423% +49.335%]
                        Performance has improved.
Benchmarking read_parallel/16x256 KiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.6s, enable flat sampling, or reduce sample count to 60.
Benchmarking read_parallel/16x256 KiB: Collecting 100 samples in estimated 6.5647 s (5                                                                                      read_parallel/16x256 KiB
                        time:   [1.2635 ms 1.2754 ms 1.2879 ms]
                        thrpt:  [3.0331 GiB/s 3.0628 GiB/s 3.0917 GiB/s]
                 change:
                        time:   [-43.727% -42.257% -40.791%] (p = 0.00 < 0.05)
                        thrpt:  [+68.892% +73.182% +77.705%]
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe
Benchmarking read_parallel/1x4.00 MiB: Collecting 100 samples in estimated 5.0311 s (1                                                                                      read_parallel/1x4.00 MiB
                        time:   [3.0774 ms 3.1015 ms 3.1233 ms]
                        thrpt:  [1.2507 GiB/s 1.2595 GiB/s 1.2693 GiB/s]
                 change:
                        time:   [-4.8023% -3.2892% -1.7819%] (p = 0.00 < 0.05)
                        thrpt:  [+1.8143% +3.4011% +5.0446%]
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  10 (10.00%) low severe
  1 (1.00%) low mild
Benchmarking read_parallel/2x4.00 MiB: Collecting 100 samples in estimated 5.2189 s (1                                                                                      read_parallel/2x4.00 MiB
                        time:   [4.1815 ms 4.2154 ms 4.2507 ms]
                        thrpt:  [1.8379 GiB/s 1.8533 GiB/s 1.8684 GiB/s]
                 change:
                        time:   [-15.132% -13.792% -12.524%] (p = 0.00 < 0.05)
                        thrpt:  [+14.317% +15.999% +17.831%]
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) high mild
Benchmarking read_parallel/4x4.00 MiB: Collecting 100 samples in estimated 5.6546 s (8                                                                                      read_parallel/4x4.00 MiB
                        time:   [6.9980 ms 7.0445 ms 7.0927 ms]
                        thrpt:  [2.2030 GiB/s 2.2181 GiB/s 2.2328 GiB/s]
                 change:
                        time:   [-30.105% -29.402% -28.689%] (p = 0.00 < 0.05)
                        thrpt:  [+40.231% +41.647% +43.071%]
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking read_parallel/8x4.00 MiB: Collecting 100 samples in estimated 7.0706 s (3                                                                                      read_parallel/8x4.00 MiB
                        time:   [23.603 ms 23.706 ms 23.811 ms]
                        thrpt:  [1.3124 GiB/s 1.3182 GiB/s 1.3240 GiB/s]
                 change:
                        time:   [-21.066% -20.592% -20.109%] (p = 0.00 < 0.05)
                        thrpt:  [+25.171% +25.931% +26.688%]
                        Performance has improved.
Benchmarking read_parallel/16x4.00 MiB: Collecting 100 samples in estimated 8.9309 s (                                                                                      read_parallel/16x4.00 MiB
                        time:   [44.391 ms 44.789 ms 45.176 ms]
                        thrpt:  [1.3835 GiB/s 1.3954 GiB/s 1.4079 GiB/s]
                 change:
                        time:   [+44.796% +47.545% +50.214%] (p = 0.00 < 0.05)
                        thrpt:  [-33.428% -32.224% -30.937%]
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) low mild
Benchmarking read_parallel/1x16.0 MiB: Collecting 100 samples in estimated 5.3196 s (6                                                                                      read_parallel/1x16.0 MiB
                        time:   [9.4500 ms 9.5788 ms 9.7071 ms]
                        thrpt:  [1.6097 GiB/s 1.6312 GiB/s 1.6534 GiB/s]
                 change:
                        time:   [+19.030% +20.805% +22.463%] (p = 0.00 < 0.05)
                        thrpt:  [-18.342% -17.222% -15.987%]
                        Performance has regressed.
Benchmarking read_parallel/2x16.0 MiB: Collecting 100 samples in estimated 5.9183 s (3                                                                                      read_parallel/2x16.0 MiB
                        time:   [19.640 ms 19.779 ms 19.921 ms]
                        thrpt:  [1.5687 GiB/s 1.5799 GiB/s 1.5911 GiB/s]
                 change:
                        time:   [+25.894% +27.014% +28.101%] (p = 0.00 < 0.05)
                        thrpt:  [-21.936% -21.269% -20.568%]
                        Performance has regressed.
Found 5 outliers among 100 measurements (5.00%)
  1 (1.00%) low mild
  4 (4.00%) high mild
Benchmarking read_parallel/4x16.0 MiB: Collecting 100 samples in estimated 8.3221 s (2                                                                                      read_parallel/4x16.0 MiB
                        time:   [41.902 ms 42.105 ms 42.304 ms]
                        thrpt:  [1.4774 GiB/s 1.4844 GiB/s 1.4916 GiB/s]
                 change:
                        time:   [+29.852% +31.056% +32.248%] (p = 0.00 < 0.05)
                        thrpt:  [-24.385% -23.697% -22.989%]
                        Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) low mild
Benchmarking read_parallel/8x16.0 MiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.7s, or reduce sample count to 50.
Benchmarking read_parallel/8x16.0 MiB: Collecting 100 samples in estimated 8.7378 s (1                                                                                      read_parallel/8x16.0 MiB
                        time:   [85.327 ms 85.983 ms 86.658 ms]
                        thrpt:  [1.4425 GiB/s 1.4538 GiB/s 1.4650 GiB/s]
                 change:
                        time:   [+17.501% +19.067% +20.669%] (p = 0.00 < 0.05)
                        thrpt:  [-17.129% -16.014% -14.894%]
                        Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Benchmarking read_parallel/16x16.0 MiB: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 16.4s, or reduce sample count to 30.
Benchmarking read_parallel/16x16.0 MiB: Collecting 100 samples in estimated 16.438 s (                                                                                      read_parallel/16x16.0 MiB
                        time:   [164.87 ms 165.74 ms 166.65 ms]
                        thrpt:  [1.5001 GiB/s 1.5084 GiB/s 1.5163 GiB/s]
                 change:
                        time:   [+8.8358% +9.7925% +10.800%] (p = 0.00 < 0.05)
                        thrpt:  [-9.7474% -8.9191% -8.1185%]
                        Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
Case Name Isahc Time Isahc Thoughtput Hyper Time Hyper Throughput
read_full/4.00 KiB 452.16 8.6391 MiB/s 446.16 8.7553 MiB/s
read_full/256 KiB 551.01 453.71 MiB/s 530.15 471.56 MiB/s
read_full/4.00 MiB 2375.6 1.6443 GiB/s 1787.9 2.1849 GiB/s
read_full/16.0 MiB 8060.3 1.9385 GiB/s 6692.2 2.3348 GiB/s
read_part/4.00 KiB 502.35 7.7760 MiB/s 432.51 9.0316 MiB/s
read_part/256 KiB 572.42 436.74 MiB/s 547.4 456.70 MiB/s
read_part/4.00 MiB 3130.4 1.2478 GiB/s 2456.1 1.5904 GiB/s
read_part/16.0 MiB 10379 1.5055 GiB/s 7807.3 2.0013 GiB/s
read_parallel/1x4.00 KiB 475.74 8.2109 MiB/s 459.22 8.5062 MiB/s
read_parallel/2x4.00 KiB 514.86 15.174 MiB/s 460.21 16.976 MiB/s
read_parallel/4x4.00 KiB 537.37 29.077 MiB/s 487.54 32.049 MiB/s
read_parallel/8x4.00 KiB 658.73 47.440 MiB/s 572.37 54.598 MiB/s
read_parallel/16x4.00 KiB 981.99 63.646 MiB/s 762.43 81.974 MiB/s
read_parallel/1x256 KiB 753.06 331.98 MiB/s 651.3 383.85 MiB/s
read_parallel/2x256 KiB 750.16 666.53 MiB/s 766.7 652.14 MiB/s
read_parallel/4x256 KiB 895.56 1.0904 GiB/s 814.43 1.1991 GiB/s
read_parallel/8x256 KiB 1432.5 1.3634 GiB/s 938.59 2.0809 GiB/s
read_parallel/16x256 KiB 2218.4 1.7608 GiB/s 1275.4 3.0628 GiB/s
read_parallel/1x4.00 MiB 3207 1.2180 GiB/s 3101.5 1.2595 GiB/s
read_parallel/2x4.00 MiB 4889.8 1.5977 GiB/s 4215.4 1.8533 GiB/s
read_parallel/4x4.00 MiB 9978.3 1.5659 GiB/s 7044.5 2.2181 GiB/s
read_parallel/8x4.00 MiB 29853 1.0468 GiB/s 23706 1.3182 GiB/s
read_parallel/16x4.00 MiB 30356 2.0589 GiB/s 44789 1.3954 GiB/s
read_parallel/1x16.0 MiB 79292 1.9706 GiB/s 95788 1.6312 GiB/s
read_parallel/2x16.0 MiB 15573 2.0067 GiB/s 19779 1.5799 GiB/s
read_parallel/4x16.0 MiB 32127 1.9454 GiB/s 42105 1.4844 GiB/s
read_parallel/8x16.0 MiB 72214 1.7310 GiB/s 85983 1.4538 GiB/s
read_parallel/16x16.0 MiB 150950 1.6561 GiB/s 165740 1.5084 GiB/s

Also reported to sagebind/isahc#401

Xuanwo added 7 commits July 25, 2022 20:26
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
@Xuanwo
Copy link
Member Author

Xuanwo commented Jul 26, 2022

isahc's maintainer confirms the benchmark. We will evaluate isahc for the next major release.

@Xuanwo Xuanwo closed this Jul 26, 2022
@Xuanwo Xuanwo deleted the curl branch July 26, 2022 02:57
@Xuanwo Xuanwo restored the curl branch August 5, 2022 09:51
@Xuanwo Xuanwo reopened this Aug 5, 2022
@Xuanwo Xuanwo marked this pull request as ready for review August 5, 2022 09:52
@Xuanwo Xuanwo changed the title demo: Use isahc to replace hyper feat: Use isahc to replace hyper Aug 5, 2022
Xuanwo added 2 commits August 5, 2022 18:12
Signed-off-by: Xuanwo <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
@Xuanwo Xuanwo merged commit 665557f into main Aug 5, 2022
@Xuanwo Xuanwo deleted the curl branch August 5, 2022 12:18
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.

1 participant