Reduce max staked streams count to avoid fragmentations (#32771)
Reduce max staked concurrent streams to 512 from 2048.
This commit is contained in:
parent
0de8ccfda9
commit
b44c9bca89
|
@ -10,8 +10,11 @@ pub const QUIC_MIN_STAKED_CONCURRENT_STREAMS: usize = 128;
|
||||||
|
|
||||||
pub const QUIC_TOTAL_STAKED_CONCURRENT_STREAMS: usize = 100_000;
|
pub const QUIC_TOTAL_STAKED_CONCURRENT_STREAMS: usize = 100_000;
|
||||||
|
|
||||||
// Set the maximum concurrent stream numbers to avoid excessive streams
|
// Set the maximum concurrent stream numbers to avoid excessive streams.
|
||||||
pub const QUIC_MAX_STAKED_CONCURRENT_STREAMS: usize = 2048;
|
// The value was lowered from 2048 to reduce contention of the limited
|
||||||
|
// receive_window among the streams which is observed in CI bench-tests with
|
||||||
|
// forwarded packets from staked nodes.
|
||||||
|
pub const QUIC_MAX_STAKED_CONCURRENT_STREAMS: usize = 512;
|
||||||
|
|
||||||
pub const QUIC_MAX_TIMEOUT: Duration = Duration::from_secs(2);
|
pub const QUIC_MAX_TIMEOUT: Duration = Duration::from_secs(2);
|
||||||
pub const QUIC_KEEP_ALIVE: Duration = Duration::from_secs(1);
|
pub const QUIC_KEEP_ALIVE: Duration = Duration::from_secs(1);
|
||||||
|
|
|
@ -1934,7 +1934,8 @@ pub mod test {
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
compute_max_allowed_uni_streams(ConnectionPeerType::Staked, 100, 10000),
|
compute_max_allowed_uni_streams(ConnectionPeerType::Staked, 100, 10000),
|
||||||
(delta / (100_f64)) as usize + QUIC_MIN_STAKED_CONCURRENT_STREAMS
|
((delta / (100_f64)) as usize + QUIC_MIN_STAKED_CONCURRENT_STREAMS)
|
||||||
|
.min(QUIC_MAX_STAKED_CONCURRENT_STREAMS)
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
compute_max_allowed_uni_streams(ConnectionPeerType::Staked, 0, 10000),
|
compute_max_allowed_uni_streams(ConnectionPeerType::Staked, 0, 10000),
|
||||||
|
|
Loading…
Reference in New Issue