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 9 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

Choose a reason for hiding this comment

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

this symbol needs reexported from here to avoid breaking api. also add #[deprecated(...)] annotation plz

Copy link
Author

Choose a reason for hiding this comment

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

Done

@@ -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

Choose a reason for hiding this comment

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

these similarly need reexported here with deprecation annotations

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

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

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

core/src/tpu.rs Outdated Show resolved Hide resolved
core/src/validator.rs Outdated Show resolved Hide resolved
validator/src/cli.rs Outdated Show resolved Hide resolved
@lijunwangs
Copy link
Author

lijunwangs commented Dec 22, 2024

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

Yes -- I'have thought about that. But I took the action to consolidate the public defaults in various places to streamer::quic. For a few reasons:

  1. We never promised solana-streamer to a public interface as others like solana-sdk, solana-client, solana-geyser-interface. The interfaces are made public to share among agave's crates. We have done such refactoring before. But I agree with should interface cleaner and stable if we can, hope this refactoring actually make it more stable in the future... :)
  2. We are renaming some of the constant from MAX_*** to DEFAULT_MAX_** to connote they are configurable anyway which requires a change of the names.
  3. streamer::nonblocking is pure internal implementation should have been hidden and use streamer::quic as the only interface for quic related server interactions.

@lijunwangs
Copy link
Author

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

Yes -- I'have thought about that. But I took the action to consolidate the public defaults in various places to streamer::quic. For a few reasons:

  1. We never promised solana-streamer to a public interface as others like solana-sdk, solana-client, solana-geyser-interface. The interfaces are made public to share among agave's crates. We have done such refactoring before. But I agree with should interface cleaner and stable if we can, hope this refactoring actually make it more stable in the future... :)
  2. We are renaming some of the constant from MAX_*** to DEFAULT_MAX_** to connote they are configurable anyway which requires a change of the names.
  3. streamer::nonblocking is pure internal implementation should have been hidden and use streamer::quic as the only interface for quic related server interactions.

Hi @alessandrod, just a gentle nudge, can you please take another look at this PR? Thanks

@alessandrod
Copy link

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

Yes -- I'have thought about that. But I took the action to consolidate the public defaults in various places to streamer::quic. For a few reasons:
Hi @alessandrod, just a gentle nudge, can you please take another look at this PR? Thanks

I'm on board (i don't care about not breaking these "accidental" APIs), but you need to get @t-nelson on board too since he blocked a similar PR a few months ago (the one consolidating arguments from stephen? Can't seem to find it now)

@lijunwangs lijunwangs requested a review from t-nelson January 7, 2025 05:49
@lijunwangs
Copy link
Author

lijunwangs commented Jan 7, 2025

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

Yes -- I'have thought about that. But I took the action to consolidate the public defaults in various places to streamer::quic. For a few reasons:
Hi @alessandrod, just a gentle nudge, can you please take another look at this PR? Thanks

I'm on board (i don't care about not breaking these "accidental" APIs), but you need to get @t-nelson on board too since he blocked a similar PR a few months ago (the one consolidating arguments from stephen? Can't seem to find it now)

I think it is about this PR #3328 which is already merged -- my take from that conversation is streamer is not really a public crate. I added @t-nelson to review.

@lijunwangs
Copy link
Author

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

Yes -- I'have thought about that. But I took the action to consolidate the public defaults in various places to streamer::quic. For a few reasons:
Hi @alessandrod, just a gentle nudge, can you please take another look at this PR? Thanks

I'm on board (i don't care about not breaking these "accidental" APIs), but you need to get @t-nelson on board too since he blocked a similar PR a few months ago (the one consolidating arguments from stephen? Can't seem to find it now)

I think it is about this PR #3328 which is already merged -- my take from that conversation is streamer is not really a public crate. I added @t-nelson to review.

Hi @t-nelson do you have any concerns regarding this? Need to wrap this PR up. Thanks.

@lijunwangs
Copy link
Author

This looks good, however it breaks API but renaming/moving some pub items. I don't care, but in the past people have complained about this so might be worth trying to not do those changes?

Yes -- I'have thought about that. But I took the action to consolidate the public defaults in various places to streamer::quic. For a few reasons:
Hi @alessandrod, just a gentle nudge, can you please take another look at this PR? Thanks

I'm on board (i don't care about not breaking these "accidental" APIs), but you need to get @t-nelson on board too since he blocked a similar PR a few months ago (the one consolidating arguments from stephen? Can't seem to find it now)

I think it is about this PR #3328 which is already merged -- my take from that conversation is streamer is not really a public crate. I added @t-nelson to review.

Hi @t-nelson do you have any concerns regarding this? Need to wrap this PR up. Thanks.

I checked PR #3328 's commit: 6319db8c7a8938a7e63e6d698a04670be3de0576 is not yet released: v2.2.x. We get in these refactoring changes together in one release to reduce churns. cc @sakridge @alessandrod @t-nelson

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