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

Use a stack allocation for header protection #1978

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

martinthomson
Copy link
Member

The use of Vec here is unnecessary. We can use a fixed sized array instead. It means that we'll not be generating 64 bytes of data for ChaCha20 header protection, but that's also a net win.

The performance gain here is negligible, but the code becomes cleaner, so I consider that a win.

The use of `Vec` here is unnecessary.  We can use a fixed sized array
instead.

The performance gain here is negligible, but the code becomes
cleaner, so that's a win.
Copy link

Failed Interop Tests

QUIC Interop Runner, client vs. server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

Copy link
Collaborator

@larseggert larseggert left a comment

Choose a reason for hiding this comment

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

@KershawChang we should make this part of 0.8.0.

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.97%. Comparing base (9f0a86d) to head (7e75ca3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1978      +/-   ##
==========================================
- Coverage   94.97%   94.97%   -0.01%     
==========================================
  Files         112      112              
  Lines       36509    36504       -5     
==========================================
- Hits        34673    34668       -5     
  Misses       1836     1836              

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

@mxinden
Copy link
Collaborator

mxinden commented Jul 12, 2024

@KershawChang we should make this part of 0.8.0.

v0.8.0 has already been tagged. I would prefer treating git tags as immutable, i.e. not alter them once pushed.

@larseggert
Copy link
Collaborator

OK, 0.8.1 then :-) And let's not vendor in 0.8.0.

@KershawChang
Copy link
Collaborator

OK, 0.8.1 then :-) And let's not vendor in 0.8.0.

Is this urgent? Can we wait until issue #1975 is fixed?

Copy link

Benchmark results

Performance differences relative to 9f0a86d.

coalesce_acked_from_zero 1+1 entries: No change in performance detected.
       time:   [194.21 ns 194.67 ns 195.17 ns]
       change: [-0.5951% +0.1099% +0.7132%] (p = 0.76 > 0.05)

Found 21 outliers among 100 measurements (21.00%)
3 (3.00%) low mild
10 (10.00%) high mild
8 (8.00%) high severe

coalesce_acked_from_zero 3+1 entries: No change in performance detected.
       time:   [234.09 ns 234.65 ns 235.25 ns]
       change: [-0.3057% +0.1774% +0.7291%] (p = 0.51 > 0.05)

Found 15 outliers among 100 measurements (15.00%)
1 (1.00%) low mild
1 (1.00%) high mild
13 (13.00%) high severe

coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [234.25 ns 235.09 ns 236.07 ns]
       change: [-0.2659% +0.0849% +0.4352%] (p = 0.64 > 0.05)

Found 8 outliers among 100 measurements (8.00%)
1 (1.00%) high mild
7 (7.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [216.05 ns 216.30 ns 216.57 ns]
       change: [-0.1414% +0.5029% +1.2039%] (p = 0.16 > 0.05)

Found 10 outliers among 100 measurements (10.00%)
1 (1.00%) high mild
9 (9.00%) high severe

RxStreamOrderer::inbound_frame(): No change in performance detected.
       time:   [118.92 ms 119.02 ms 119.12 ms]
       change: [-0.2446% -0.0465% +0.1063%] (p = 0.65 > 0.05)

Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild

transfer/Run multiple transfers with varying seeds: No change in performance detected.
       time:   [54.460 ms 57.543 ms 60.660 ms]
       thrpt:  [65.941 MiB/s 69.513 MiB/s 73.449 MiB/s]
change:
       time:   [-2.9551% +5.2097% +14.293%] (p = 0.22 > 0.05)
       thrpt:  [-12.506% -4.9517% +3.0451%]
transfer/Run multiple transfers with the same seed: No change in performance detected.
       time:   [66.910 ms 73.185 ms 79.524 ms]
       thrpt:  [50.299 MiB/s 54.656 MiB/s 59.782 MiB/s]
change:
       time:   [-14.630% -3.4066% +9.4710%] (p = 0.58 > 0.05)
       thrpt:  [-8.6516% +3.5267% +17.137%]
1-conn/1-100mb-resp (aka. Download)/client: No change in performance detected.
       time:   [151.10 ms 157.47 ms 166.79 ms]
       thrpt:  [599.54 MiB/s 635.03 MiB/s 661.80 MiB/s]
change:
       time:   [-13.743% -7.1554% -0.3541%] (p = 0.08 > 0.05)
       thrpt:  [+0.3553% +7.7068% +15.933%]

Found 1 outliers among 10 measurements (10.00%)
1 (10.00%) high severe

1-conn/10_000-parallel-1b-resp (aka. RPS)/client: No change in performance detected.
       time:   [433.02 ms 436.44 ms 439.97 ms]
       thrpt:  [22.729 Kelem/s 22.912 Kelem/s 23.094 Kelem/s]
change:
       time:   [-1.5817% -0.3788% +0.7786%] (p = 0.52 > 0.05)
       thrpt:  [-0.7726% +0.3803% +1.6071%]

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

1-conn/1-1b-resp (aka. HPS)/client: No change in performance detected.
       time:   [43.252 ms 43.813 ms 44.376 ms]
       thrpt:  [22.535  elem/s 22.824  elem/s 23.120  elem/s]
change:
       time:   [-2.4728% -0.6989% +1.0864%] (p = 0.45 > 0.05)
       thrpt:  [-1.0747% +0.7038% +2.5355%]

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing Mean [ms] Min [ms] Max [ms] Relative
msquic msquic 179.0 ± 138.5 98.8 596.5 1.00
neqo msquic reno on 299.9 ± 84.1 254.4 537.8 1.00
neqo msquic reno 324.7 ± 100.0 268.0 518.6 1.00
neqo msquic cubic on 294.8 ± 72.3 251.0 498.2 1.00
neqo msquic cubic 319.2 ± 73.7 263.6 469.1 1.00
msquic neqo reno on 278.8 ± 158.5 116.9 629.6 1.00
msquic neqo reno 200.3 ± 88.1 111.3 372.0 1.00
msquic neqo cubic on 680.5 ± 1862.1 129.1 7654.6 1.00
msquic neqo cubic 262.3 ± 106.5 115.8 409.6 1.00
neqo neqo reno on 278.2 ± 98.3 169.0 459.7 1.00
neqo neqo reno 261.7 ± 109.8 168.3 491.7 1.00
neqo neqo cubic on 229.7 ± 88.7 155.1 456.9 1.00
neqo neqo cubic 245.7 ± 119.1 161.0 594.6 1.00

⬇️ Download logs

Copy link

Firefox builds for this PR

The following builds are available for testing. Crossed-out builds did not succeed.

@larseggert
Copy link
Collaborator

Is this urgent? Can we wait until issue #1975 is fixed?

We can wait until #1975.

@larseggert larseggert added this pull request to the merge queue Jul 12, 2024
Merged via the queue into mozilla:main with commit 59dc0ab Jul 12, 2024
57 checks passed
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.

4 participants