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

make QUIC tpu QOS parameters configurable #4170

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lijunwangs
Copy link

@lijunwangs lijunwangs commented Dec 19, 2024

Problem

Making QUIC TPU QOS parameters configurable so that it is easier to tweak performance and do bench marks.

Summary of Changes

CLI is enabled to pass the following:

--tpu-max-connections-per-peer
--max-tpu-staked-connections
--max-tpu-unstaked-connections
--max-fwd-staked-connections
--max-fwd-unstaked-connections

They are set to hidden unless forced to be shown.

Elevate QuicServerParams configuration to ValidatorTpuConfig as field to configure
tpu, tpu forward and vote quic server parameters.

Move the public default parameters to quic from nonblocking::quic to encapsulate better.

Fixes #

@@ -54,9 +51,6 @@ use {
tokio::sync::mpsc::Sender as AsyncSender,
};

// allow multiple connections for NAT and any open/close overlap
pub const MAX_QUIC_CONNECTIONS_PER_PEER: usize = 8;
Copy link
Author

Choose a reason for hiding this comment

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

moved to quic.rs in streamer

@@ -87,14 +87,6 @@ const CONNECTION_CLOSE_REASON_TOO_MANY: &[u8] = b"too_many";
const CONNECTION_CLOSE_CODE_INVALID_STREAM: u32 = 5;
const CONNECTION_CLOSE_REASON_INVALID_STREAM: &[u8] = b"invalid_stream";

/// Limit to 250K PPS
Copy link
Author

Choose a reason for hiding this comment

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

move to ../quic.rs

@@ -32,8 +29,19 @@ use {
tokio::runtime::Runtime,
};

pub const MAX_STAKED_CONNECTIONS: usize = 2000;
Copy link
Author

@lijunwangs lijunwangs Dec 19, 2024

Choose a reason for hiding this comment

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

Rename them to have the DEFAULT_ prefix as they are configurable now

..Default::default()
};

// Vote shares TPU forward's characteristics, except that we accept 1 connection
Copy link
Author

Choose a reason for hiding this comment

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

It should not accept any unstaked connections

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.

1 participant