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: More migration tests and related fixes #2170

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

larseggert
Copy link
Collaborator

@larseggert larseggert commented Oct 11, 2024

This expands the migration test quite a bit. It now tests all the way until retirement of the original path, for both port-only (rebinding_port) and address-and-port (rebinding_address_and_port) changes, with and without zero-len client CIDs.

This now includes #2182 and #2176.

This expands the migration test quite a bit. It now tests alll the way
until retirement of the original path, for both port-only
(`rebinding_port`) and address-and-port (`rebinding_address_and_port`)
changes.

`rebinding_address_and_port` is succeeding, but `rebinding_port` is
currently failing. That's because we treat it differently for some
reason. If we replace `Paths::find_path_with_rebinding` with
`Paths::find_path`, i.e., do proper path validation when only the port
changes, the test succeeds.

Leaving this out in case I'm missing something about the intent of the
difference.
@larseggert
Copy link
Collaborator Author

In a related QNS test, we have the problem that the client does not issue a new connection ID when the server retires the path, and then we time out because the client wont accept any more packets from the server. I was hoping to reproduce this with this test, but it's behaving differently. Sigh.

Copy link

github-actions bot commented Oct 11, 2024

Failed Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

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

Project coverage is 95.38%. Comparing base (05b4af9) to head (bff2c92).

Files with missing lines Patch % Lines
neqo-transport/src/cid.rs 93.75% 1 Missing ⚠️
neqo-transport/src/path.rs 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2170      +/-   ##
==========================================
- Coverage   95.39%   95.38%   -0.02%     
==========================================
  Files         112      112              
  Lines       36447    36424      -23     
==========================================
- Hits        34768    34742      -26     
- Misses       1679     1682       +3     

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

@larseggert larseggert changed the title test: More migration testing fix: More migration tests and related fixes Oct 18, 2024
@larseggert larseggert marked this pull request as ready for review October 18, 2024 14:49
Copy link
Collaborator

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Thank you for expanding the test matrix!

neqo-transport/src/cid.rs Show resolved Hide resolved
neqo-transport/src/cid.rs Outdated Show resolved Hide resolved
neqo-transport/src/connection/tests/migration.rs Outdated Show resolved Hide resolved
neqo-transport/src/connection/tests/migration.rs Outdated Show resolved Hide resolved
let path = self.paths.find_path_with_rebinding(
let path = self.paths.find_path(
Copy link
Collaborator

Choose a reason for hiding this comment

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

For others, relevant discussion happening on #2176 (review).

Copy link

github-actions bot commented Oct 21, 2024

Benchmark results

Performance differences relative to 05b4af9.

coalesce_acked_from_zero 1+1 entries: 💚 Performance has improved.
       time:   [92.335 ns 92.659 ns 92.996 ns]
       change: [-7.3425% -6.8272% -6.3022%] (p = 0.00 < 0.05)

Found 13 outliers among 100 measurements (13.00%)
9 (9.00%) high mild
4 (4.00%) high severe

coalesce_acked_from_zero 3+1 entries: 💚 Performance has improved.
       time:   [103.04 ns 103.45 ns 103.89 ns]
       change: [-13.133% -12.456% -11.850%] (p = 0.00 < 0.05)

Found 11 outliers among 100 measurements (11.00%)
2 (2.00%) high mild
9 (9.00%) high severe

coalesce_acked_from_zero 10+1 entries: 💚 Performance has improved.
       time:   [102.52 ns 102.85 ns 103.29 ns]
       change: [-12.535% -11.970% -11.249%] (p = 0.00 < 0.05)

Found 10 outliers among 100 measurements (10.00%)
4 (4.00%) low mild
1 (1.00%) high mild
5 (5.00%) high severe

coalesce_acked_from_zero 1000+1 entries: 💚 Performance has improved.
       time:   [82.192 ns 82.304 ns 82.441 ns]
       change: [-15.685% -14.862% -14.024%] (p = 0.00 < 0.05)

Found 9 outliers among 100 measurements (9.00%)
4 (4.00%) high mild
5 (5.00%) high severe

RxStreamOrderer::inbound_frame(): Change within noise threshold.
       time:   [111.01 ms 111.08 ms 111.14 ms]
       change: [-0.6841% -0.6080% -0.5382%] (p = 0.00 < 0.05)

Found 15 outliers among 100 measurements (15.00%)
10 (10.00%) low mild
5 (5.00%) high mild

transfer/pacing-false/varying-seeds: No change in performance detected.
       time:   [26.581 ms 27.629 ms 28.700 ms]
       change: [-3.2835% +2.4803% +8.5897%] (p = 0.40 > 0.05)

Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) low mild
4 (4.00%) high mild

transfer/pacing-true/varying-seeds: 💔 Performance has regressed.
       time:   [37.653 ms 39.376 ms 41.107 ms]
       change: [+4.0220% +10.836% +18.580%] (p = 0.00 < 0.05)
transfer/pacing-false/same-seed: No change in performance detected.
       time:   [26.583 ms 27.357 ms 28.140 ms]
       change: [-0.0002% +4.2663% +8.8339%] (p = 0.05 > 0.05)

Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild

transfer/pacing-true/same-seed: No change in performance detected.
       time:   [42.654 ms 44.385 ms 46.119 ms]
       change: [-2.5686% +3.5698% +9.9124%] (p = 0.26 > 0.05)
1-conn/1-100mb-resp/mtu-1500 (aka. Download)/client: No change in performance detected.
       time:   [862.82 ms 870.21 ms 877.87 ms]
       thrpt:  [113.91 MiB/s 114.91 MiB/s 115.90 MiB/s]
change:
       time:   [-2.2936% -0.9725% +0.3551%] (p = 0.16 > 0.05)
       thrpt:  [-0.3539% +0.9821% +2.3474%]
1-conn/10_000-parallel-1b-resp/mtu-1500 (aka. RPS)/client: Change within noise threshold.
       time:   [317.07 ms 320.08 ms 323.14 ms]
       thrpt:  [30.947 Kelem/s 31.242 Kelem/s 31.539 Kelem/s]
change:
       time:   [-2.8723% -1.5638% -0.1460%] (p = 0.03 < 0.05)
       thrpt:  [+0.1462% +1.5887% +2.9572%]
1-conn/1-1b-resp/mtu-1500 (aka. HPS)/client: No change in performance detected.
       time:   [33.735 ms 33.928 ms 34.134 ms]
       thrpt:  [29.297  elem/s 29.474  elem/s 29.643  elem/s]
change:
       time:   [-1.4937% -0.6399% +0.2095%] (p = 0.15 > 0.05)
       thrpt:  [-0.2091% +0.6440% +1.5163%]

Found 6 outliers among 100 measurements (6.00%)
1 (1.00%) low mild
3 (3.00%) high mild
2 (2.00%) high severe

1-conn/1-100mb-resp/mtu-1500 (aka. Upload)/client: 💔 Performance has regressed.
       time:   [1.7960 s 1.8132 s 1.8307 s]
       thrpt:  [54.623 MiB/s 55.150 MiB/s 55.680 MiB/s]
change:
       time:   [+1.8747% +3.2103% +4.5459%] (p = 0.00 < 0.05)
       thrpt:  [-4.3482% -3.1105% -1.8402%]
1-conn/1-100mb-resp/mtu-65536 (aka. Download)/client: No change in performance detected.
       time:   [111.24 ms 111.52 ms 111.80 ms]
       thrpt:  [894.48 MiB/s 896.70 MiB/s 898.95 MiB/s]
change:
       time:   [-3.2188% -0.8808% +0.5089%] (p = 0.60 > 0.05)
       thrpt:  [-0.5063% +0.8886% +3.3258%]
1-conn/10_000-parallel-1b-resp/mtu-65536 (aka. RPS)/client: No change in performance detected.
       time:   [315.87 ms 319.21 ms 322.52 ms]
       thrpt:  [31.006 Kelem/s 31.327 Kelem/s 31.659 Kelem/s]
change:
       time:   [-0.5464% +0.8715% +2.3404%] (p = 0.24 > 0.05)
       thrpt:  [-2.2869% -0.8640% +0.5494%]
1-conn/1-1b-resp/mtu-65536 (aka. HPS)/client: No change in performance detected.
       time:   [33.993 ms 34.191 ms 34.410 ms]
       thrpt:  [29.061  elem/s 29.248  elem/s 29.418  elem/s]
change:
       time:   [-0.6993% +0.0433% +0.7674%] (p = 0.91 > 0.05)
       thrpt:  [-0.7616% -0.0433% +0.7042%]

Found 7 outliers among 100 measurements (7.00%)
5 (5.00%) high mild
2 (2.00%) high severe

1-conn/1-100mb-resp/mtu-65536 (aka. Upload)/client: No change in performance detected.
       time:   [268.70 ms 294.77 ms 335.48 ms]
       thrpt:  [298.08 MiB/s 339.25 MiB/s 372.16 MiB/s]
change:
       time:   [-6.0914% +5.1517% +21.201%] (p = 0.52 > 0.05)
       thrpt:  [-17.493% -4.8993% +6.4865%]

Found 15 outliers among 100 measurements (15.00%)
5 (5.00%) high mild
10 (10.00%) high severe

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing MTU Mean [ms] Min [ms] Max [ms] Relative
msquic msquic 1504 124.2 ± 28.5 91.7 181.9 1.00
neqo msquic reno on 1504 226.5 ± 22.2 201.2 265.9 1.00
neqo msquic reno 1504 226.8 ± 19.8 200.0 256.7 1.00
neqo msquic cubic on 1504 215.0 ± 14.0 198.3 239.0 1.00
neqo msquic cubic 1504 233.8 ± 19.5 206.1 265.7 1.00
msquic neqo reno on 1504 727.1 ± 18.0 692.8 753.4 1.00
msquic neqo reno 1504 696.6 ± 11.5 679.6 709.6 1.00
msquic neqo cubic on 1504 715.0 ± 12.0 694.9 732.6 1.00
msquic neqo cubic 1504 715.6 ± 11.6 693.5 733.2 1.00
neqo neqo reno on 1504 417.3 ± 11.5 399.4 439.9 1.00
neqo neqo reno 1504 421.7 ± 14.6 396.6 445.4 1.00
neqo neqo cubic on 1504 437.0 ± 10.5 416.7 452.7 1.00
neqo neqo cubic 1504 426.8 ± 14.7 409.7 448.4 1.00
msquic msquic 65536 108.7 ± 35.0 91.2 253.3 1.00
neqo msquic reno on 65536 213.5 ± 15.3 195.9 236.9 1.00
neqo msquic reno 65536 209.4 ± 11.7 197.0 233.8 1.00
neqo msquic cubic on 65536 209.8 ± 13.8 200.5 252.9 1.00
neqo msquic cubic 65536 211.7 ± 11.1 197.7 232.6 1.00
msquic neqo reno on 65536 92.4 ± 20.4 81.3 181.0 1.00
msquic neqo reno 65536 113.0 ± 77.6 82.3 466.2 1.00
msquic neqo cubic on 65536 97.7 ± 22.3 82.0 170.4 1.00
msquic neqo cubic 65536 102.1 ± 28.1 82.2 178.4 1.00
neqo neqo reno on 65536 155.0 ± 34.9 121.3 258.6 1.00
neqo neqo reno 65536 174.1 ± 86.2 115.4 375.0 1.00
neqo neqo cubic on 65536 148.5 ± 40.3 124.7 277.3 1.00
neqo neqo cubic 65536 183.3 ± 86.7 119.0 449.2 1.00

⬇️ Download logs

Copy link
Collaborator

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

A couple of clarifying questions. Sorry in case I am missing something obvious. None of them are blocking.

Other than the discussion in #2176 (review), this looks good to me.

Comment on lines +517 to +522
let empty_cid = seqno == CONNECTION_ID_SEQNO_EMPTY
|| self
.connection_ids
.cids
.iter()
.any(|c| c.seqno == seqno && c.cid.is_empty());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let empty_cid = seqno == CONNECTION_ID_SEQNO_EMPTY
|| self
.connection_ids
.cids
.iter()
.any(|c| c.seqno == seqno && c.cid.is_empty());
let empty_cid = self
.connection_ids
.cids
.iter()
.any(|c| c.seqno == seqno && c.cid.is_empty());

Do I understand correctly, that this would be functionally the same, but less efficient?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. (I'm not in love with the CONNECTION_ID_SEQNO_EMPTY hack, esp. since we only seem to use the magic value on one end of the connection.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that self.connection_ids is likely very small, is the optimization needed? In other words, do you expect a performance impact when accepting the suggestion above?

Copy link
Collaborator Author

@larseggert larseggert Oct 25, 2024

Choose a reason for hiding this comment

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

Not sure. I mostly kept it in so the CONNECTION_ID_SEQNO_EMPTY special case is more visible :-)

neqo-transport/src/path.rs Outdated Show resolved Hide resolved
neqo-transport/src/path.rs Outdated Show resolved Hide resolved
neqo-transport/src/path.rs Outdated Show resolved Hide resolved
@@ -314,6 +314,10 @@ impl ConnectionIdEntry<[u8; 16]> {
stats.new_connection_id += 1;
true
}

pub fn is_empty(&self) -> bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
pub fn is_empty(&self) -> bool {
pub fn is_zero_len(&self) -> bool {

RFC 9000 refers to this as "zero-length Connection ID", right? How about adopting that wording here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We seem to calling these "empty", e.g., CONNECTION_ID_SEQNO_EMPTY so I stuck with that. (You're right that that's different from the RFC.)

Comment on lines +517 to +522
let empty_cid = seqno == CONNECTION_ID_SEQNO_EMPTY
|| self
.connection_ids
.cids
.iter()
.any(|c| c.seqno == seqno && c.cid.is_empty());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that self.connection_ids is likely very small, is the optimization needed? In other words, do you expect a performance impact when accepting the suggestion above?

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