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

expands transport configs in turbine QUIC endpoint #33864

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

behzadnouri
Copy link
Contributor

Problem

quinn default transport config is not suitable for turbine.

Summary of Changes

Set explicit values for transport configs in turbine QUIC endpoint

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #33864 (fd97b60) into master (78c31aa) will decrease coverage by 0.1%.
Report is 3 commits behind head on master.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #33864     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         809      809             
  Lines      217692   217697      +5     
=========================================
- Hits       178287   178285      -2     
- Misses      39405    39412      +7     

Comment on lines +46 to +52
// Transport config.
const DATAGRAM_RECEIVE_BUFFER_SIZE: usize = 256 * 1024 * 1024;
const DATAGRAM_SEND_BUFFER_SIZE: usize = 128 * 1024 * 1024;
const INITIAL_MAXIMUM_TRANSMISSION_UNIT: u16 = MINIMUM_MAXIMUM_TRANSMISSION_UNIT;
const KEEP_ALIVE_INTERVAL: Duration = Duration::from_secs(4);
const MAX_IDLE_TIMEOUT: Duration = Duration::from_secs(10);
const MINIMUM_MAXIMUM_TRANSMISSION_UNIT: u16 = 1280;
Copy link
Contributor

Choose a reason for hiding this comment

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

Were these values found/picked empirically? The MTU and durations are seemingly simple; however, the buffer size ones seem a little less straight forward to me in how the numbers were picked

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the buffer sizes I dug the default values in the quinn library and increased them by a couple of orders of magnitude because the peak of the turbine traffic can be pretty high.
https://docs.rs/quinn-proto/0.10.2/src/quinn_proto/config.rs.html#296-330

My primary goal here is to make these core configs explicit. Hopefully, the incremental testing on testnet will allow to further fine tune these if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. Maybe if/once we determine that QUIC is a suitable replacement for turbine, we can circle back and leave some paper trail comments. Hypothetically, given a block duration and block size (in shreds), we should be able to come up with a ballpark "expected load".

Not saying I think these numbers have to be a "tight fit"; rather, some rough numbers + a comment of leaving sufficient margin would be nice for the next person who is looking through the code

@behzadnouri behzadnouri requested a review from steviez November 8, 2023 20:05
@behzadnouri behzadnouri merged commit 783f136 into solana-labs:master Nov 8, 2023
17 checks passed
@behzadnouri behzadnouri deleted the turbine-quic-config branch November 8, 2023 20:28
@behzadnouri behzadnouri added the v1.17 PRs that should be backported to v1.17 label Nov 8, 2023
mergify bot pushed a commit that referenced this pull request Nov 8, 2023
mergify bot added a commit that referenced this pull request Nov 8, 2023
…#33864) (#33993)

expands transport configs in turbine QUIC endpoint (#33864)

(cherry picked from commit 783f136)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
anwayde pushed a commit to firedancer-io/solana that referenced this pull request Nov 16, 2023
…solana-labs#33864) (solana-labs#33993)

expands transport configs in turbine QUIC endpoint (solana-labs#33864)

(cherry picked from commit 783f136)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
anwayde pushed a commit to firedancer-io/solana that referenced this pull request Nov 16, 2023
…solana-labs#33864) (solana-labs#33993)

expands transport configs in turbine QUIC endpoint (solana-labs#33864)

(cherry picked from commit 783f136)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants