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(bin/client): use BufWriter when writing to file #1756

Merged
merged 8 commits into from
Mar 17, 2024

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Mar 17, 2024

neqo-client has the option to write a response to file.

With this commit, File is wrapped in a 64KB BufWriter to increase I/O batch size and thus improve performance.

Replaces #1752 (see #1752 (comment)).

@larseggert larseggert added this pull request to the merge queue Mar 17, 2024
Copy link

codecov bot commented Mar 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.97%. Comparing base (ef5caeb) to head (08bf642).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1756   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files         119      119           
  Lines       37253    37253           
=======================================
  Hits        34637    34637           
  Misses       2616     2616           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Benchmark results

Performance differences relative to ef5caeb.

  • coalesce_acked_from_zero 1+1 entries
    time: [193.10 ns 193.57 ns 194.07 ns]
    change: [-0.2210% +0.4070% +0.9860%] (p = 0.21 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 3+1 entries
    time: [235.66 ns 236.31 ns 237.04 ns]
    change: [-0.4942% -0.0134% +0.4438%] (p = 0.96 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 10+1 entries
    time: [234.69 ns 235.24 ns 235.94 ns]
    change: [-1.0880% -0.6177% -0.1786%] (p = 0.01 < 0.05)
    Change within noise threshold.

  • coalesce_acked_from_zero 1000+1 entries
    time: [213.99 ns 214.21 ns 214.47 ns]
    change: [-10.211% -3.5631% +0.5650%] (p = 0.37 > 0.05)
    No change in performance detected.

  • RxStreamOrderer::inbound_frame()
    time: [120.57 ms 120.73 ms 120.96 ms]
    change: [+0.3136% +0.4616% +0.6614%] (p = 0.00 < 0.05)
    Change within noise threshold.

  • transfer/Run multiple transfers with varying seeds
    time: [118.33 ms 118.63 ms 118.93 ms]
    thrpt: [33.634 MiB/s 33.718 MiB/s 33.802 MiB/s]
    change:
    time: [-0.0460% +0.2878% +0.6252%] (p = 0.09 > 0.05)
    thrpt: [-0.6213% -0.2870% +0.0460%]
    No change in performance detected.

  • transfer/Run multiple transfers with the same seed
    time: [118.74 ms 118.92 ms 119.12 ms]
    thrpt: [33.580 MiB/s 33.635 MiB/s 33.687 MiB/s]
    change:
    time: [-0.0088% +0.2022% +0.4126%] (p = 0.07 > 0.05)
    thrpt: [-0.4109% -0.2018% +0.0088%]
    No change in performance detected.

⬇️ Download logs

Merged via the queue into mozilla:main with commit 29fdbc0 Mar 17, 2024
15 checks passed
mxinden added a commit to mxinden/neqo that referenced this pull request May 4, 2024
There are two server implementations based on neqo:

1. https://github.com/mozilla/neqo/tree/main/neqo-bin/src/server
  - http3 and http09 implementation
  - used for manual testing and QUIC Interop

2. https://searchfox.org/mozilla-central/source/netwerk/test/http3server/src/main.rs
  - used to test Firefox

I assume one was once an exact copy of the other. Both implement their own I/O,
event loop, ... Since then, the two implementations diverged significantly.
Especially (1) saw a lot of improvements in recent months:

- mozilla#1564
- mozilla#1569
- mozilla#1578
- mozilla#1581
- mozilla#1604
- mozilla#1612
- mozilla#1676
- mozilla#1692
- mozilla#1707
- mozilla#1708
- mozilla#1727
- mozilla#1753
- mozilla#1756
- mozilla#1766
- mozilla#1772
- mozilla#1786
- mozilla#1787
- mozilla#1788
- mozilla#1794
- mozilla#1806
- mozilla#1808
- mozilla#1848
- mozilla#1866

At this point, bugs in (2) are hard to fix, see e.g.
mozilla#1801.

This commit merges (2) into (1), thus removing all duplicate logic and
having (2) benefit from all the recent improvements to (1).
KershawChang pushed a commit to KershawChang/neqo that referenced this pull request May 7, 2024
There are two server implementations based on neqo:

1. https://github.com/mozilla/neqo/tree/main/neqo-bin/src/server
  - http3 and http09 implementation
  - used for manual testing and QUIC Interop

2. https://searchfox.org/mozilla-central/source/netwerk/test/http3server/src/main.rs
  - used to test Firefox

I assume one was once an exact copy of the other. Both implement their own I/O,
event loop, ... Since then, the two implementations diverged significantly.
Especially (1) saw a lot of improvements in recent months:

- mozilla#1564
- mozilla#1569
- mozilla#1578
- mozilla#1581
- mozilla#1604
- mozilla#1612
- mozilla#1676
- mozilla#1692
- mozilla#1707
- mozilla#1708
- mozilla#1727
- mozilla#1753
- mozilla#1756
- mozilla#1766
- mozilla#1772
- mozilla#1786
- mozilla#1787
- mozilla#1788
- mozilla#1794
- mozilla#1806
- mozilla#1808
- mozilla#1848
- mozilla#1866

At this point, bugs in (2) are hard to fix, see e.g.
mozilla#1801.

This commit merges (2) into (1), thus removing all duplicate logic and
having (2) benefit from all the recent improvements to (1).
github-merge-queue bot pushed a commit that referenced this pull request May 8, 2024
* refactor(bin): introduce server/http3.rs and server/http09.rs

The QUIC Interop Runner requires an http3 and http09 implementation for both
client and server. The client code is already structured into an http3 and an
http09 implementation since #1727.

This commit does the same for the server side, i.e. splits the http3 and http09
implementation into separate Rust modules.

* refactor: merge mozilla-central http3 server into neqo-bin

There are two server implementations based on neqo:

1. https://github.com/mozilla/neqo/tree/main/neqo-bin/src/server
  - http3 and http09 implementation
  - used for manual testing and QUIC Interop

2. https://searchfox.org/mozilla-central/source/netwerk/test/http3server/src/main.rs
  - used to test Firefox

I assume one was once an exact copy of the other. Both implement their own I/O,
event loop, ... Since then, the two implementations diverged significantly.
Especially (1) saw a lot of improvements in recent months:

- #1564
- #1569
- #1578
- #1581
- #1604
- #1612
- #1676
- #1692
- #1707
- #1708
- #1727
- #1753
- #1756
- #1766
- #1772
- #1786
- #1787
- #1788
- #1794
- #1806
- #1808
- #1848
- #1866

At this point, bugs in (2) are hard to fix, see e.g.
#1801.

This commit merges (2) into (1), thus removing all duplicate logic and
having (2) benefit from all the recent improvements to (1).

* Move firefox.rs to mozilla-central

* Reduce HttpServer trait functions

* Extract constructor

* Remove unused deps

* Remove clap color feature

Nice to have. Adds multiple dependencies. Hard to justify for mozilla-central.
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.

2 participants