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

fix(bin): enable pacing on client & server by default #1753

Merged
merged 4 commits into from
Mar 17, 2024

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Mar 16, 2024

Updated version:

Before #1724 neqo-server would always run with ConnectionParameters::pacing true. neqo-client would provide a command line flag --pacing which defaulted to false.

#1724 consolidated the QuicParameters struct from neqo-client and neqo-server. Since both neqo-client and neqo-server default to pacing false.

This commit replaces the --pacing flag with --no-pacing. Pacing is enabled by default on both neqo-server and neqo-client.

Before mozilla#1724 `neqo-server` would always run
with `ConnectionParameters::pacing` `true`. `neqo-client` would provide a
command line flag `--pacing` which defaulted to `false`.

mozilla#1724 consolidated the `QuicParameters`
`struct` from `neqo-client` and `neqo-server`. Since both `neqo-client` and
`neqo-server` default to `pacing` `false`.

This commit restores the pre-mozilla#1724 behavior, i.e. `neqo-server` defaulting to
`pacing=true` and `neqo-client` defaulting to `pacing=false`.

(Note that you will have to provide a value to `--pacing` from now on. I.e.
`--pacing=true` or `--pacing=false` instead of just `--pacing`.)
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 89.48%. Comparing base (9ff3751) to head (fb324a2).
Report is 2 commits behind head on main.

Files Patch % Lines
neqo-bin/src/lib.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1753   +/-   ##
=======================================
  Coverage   89.48%   89.48%           
=======================================
  Files         126      126           
  Lines       38866    38866           
=======================================
  Hits        34780    34780           
  Misses       4086     4086           

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

Copy link

github-actions bot commented Mar 16, 2024

Benchmark results

Performance differences relative to ef5caeb.

  • coalesce_acked_from_zero 1+1 entries
    time: [192.85 ns 193.24 ns 193.68 ns]
    change: [-0.4995% +0.0449% +0.5020%] (p = 0.87 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 3+1 entries
    time: [235.67 ns 236.26 ns 236.89 ns]
    change: [-0.6060% -0.1697% +0.2504%] (p = 0.45 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 10+1 entries
    time: [235.51 ns 236.48 ns 237.58 ns]
    change: [-0.7379% -0.0915% +0.5800%] (p = 0.80 > 0.05)
    No change in performance detected.

  • coalesce_acked_from_zero 1000+1 entries
    time: [214.79 ns 224.26 ns 245.28 ns]
    change: [-9.4943% -1.5072% +4.5563%] (p = 0.79 > 0.05)
    No change in performance detected.

  • RxStreamOrderer::inbound_frame()
    time: [120.36 ms 120.44 ms 120.51 ms]
    change: [+0.1333% +0.2183% +0.3053%] (p = 0.00 < 0.05)
    Change within noise threshold.

  • transfer/Run multiple transfers with varying seeds
    time: [117.04 ms 117.36 ms 117.68 ms]
    thrpt: [33.991 MiB/s 34.084 MiB/s 34.177 MiB/s]
    change:
    time: [-1.1259% -0.7901% -0.4235%] (p = 0.00 < 0.05)
    thrpt: [+0.4253% +0.7964% +1.1387%]
    Change within noise threshold.

  • transfer/Run multiple transfers with the same seed
    time: [117.73 ms 117.92 ms 118.12 ms]
    thrpt: [33.865 MiB/s 33.921 MiB/s 33.976 MiB/s]
    change:
    time: [-0.8572% -0.6423% -0.4237%] (p = 0.00 < 0.05)
    thrpt: [+0.4255% +0.6465% +0.8646%]
    Change within noise threshold.

⬇️ Download logs

@larseggert
Copy link
Collaborator

It's probably an oversight that the two have different defaults? I think the defaults should be the same, for consistency.

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

I found clap-rs/clap#815 (comment) for doing negation. So you can have --pacing and --no-pacing options. Not sure what this does with a default of true though...

@mxinden
Copy link
Collaborator Author

mxinden commented Mar 17, 2024

It's probably an oversight that the two have different defaults? I think the defaults should be the same, for consistency.

I suggest making pacing=true the default on both client and server then. This is also consistent with the default of ConnectionParameters:

We can then expose a --no-pacing flag on both neqo-server and neqo-client.

Sounds good?

@larseggert
Copy link
Collaborator

Yes. Thank you!

Before mozilla#1724 `neqo-server` would always run
with `ConnectionParameters::pacing` `true`. `neqo-client` would provide a
command line flag `--pacing` which defaulted to `false`.

mozilla#1724 consolidated the `QuicParameters`
`struct` from `neqo-client` and `neqo-server`. Since both `neqo-client` and
`neqo-server` default to `pacing` `false`.

This commit replaces the `--pacing` flag with `--no-pacing`. Pacing is enabled
by default on both `neqo-server` and `neqo-client`.
@mxinden mxinden changed the title fix(bin): enable pacing on server by default fix(bin): enable pacing on client & server by default Mar 17, 2024
@larseggert larseggert added this pull request to the merge queue Mar 17, 2024
Merged via the queue into mozilla:main with commit 32ef2c3 Mar 17, 2024
14 of 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.

3 participants