From 69e0a0629fcda8f8ef84884ecbe9947e3f2db434 Mon Sep 17 00:00:00 2001 From: Lijun Wang <83639177+lijunwangs@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:57:53 -0700 Subject: [PATCH 1/2] lower max_streams_per_ms to 25k --- streamer/src/nonblocking/stream_throttle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamer/src/nonblocking/stream_throttle.rs b/streamer/src/nonblocking/stream_throttle.rs index 8fda63271816e6..94231b9d8f8c41 100644 --- a/streamer/src/nonblocking/stream_throttle.rs +++ b/streamer/src/nonblocking/stream_throttle.rs @@ -11,8 +11,8 @@ use { }, }; -/// Limit to 250K PPS -const MAX_STREAMS_PER_MS: u64 = 250; +/// Limit to 25K PPS +const MAX_STREAMS_PER_MS: u64 = 25; const MAX_UNSTAKED_STREAMS_PERCENT: u64 = 20; const STREAM_THROTTLING_INTERVAL_MS: u64 = 100; pub const STREAM_STOP_CODE_THROTTLING: u32 = 15; From 3cfe256822361ccde8e4d1c995db35ac795cc011 Mon Sep 17 00:00:00 2001 From: Lijun Wang <83639177+lijunwangs@users.noreply.github.com> Date: Wed, 10 Apr 2024 01:05:56 -0700 Subject: [PATCH 2/2] lower max_streams_per_ms to 25k pps from 250k pps --- streamer/src/nonblocking/stream_throttle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamer/src/nonblocking/stream_throttle.rs b/streamer/src/nonblocking/stream_throttle.rs index 94231b9d8f8c41..2a9f6382dd6596 100644 --- a/streamer/src/nonblocking/stream_throttle.rs +++ b/streamer/src/nonblocking/stream_throttle.rs @@ -243,13 +243,13 @@ pub mod test { Arc::new(StreamStats::default()), MAX_UNSTAKED_CONNECTIONS, )); - // 25K packets per ms * 20% / 500 max unstaked connections + // 2500 packets per 100 ms * 20% / 500 max unstaked connections assert_eq!( load_ema.available_load_capacity_in_throttling_duration( ConnectionPeerType::Unstaked, 10000, ), - 10 + 1 ); }