From cea0fd5a54c3cee6939acadbac077379241210ec Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Tue, 7 Mar 2023 20:57:10 +0200 Subject: [PATCH] Reduce boosting in networking to see if it helps with networking load --- crates/subspace-networking/src/create.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/subspace-networking/src/create.rs b/crates/subspace-networking/src/create.rs index ae9d3d7f63..9f22b65b73 100644 --- a/crates/subspace-networking/src/create.rs +++ b/crates/subspace-networking/src/create.rs @@ -67,7 +67,7 @@ const KADEMLIA_BASE_CONCURRENT_TASKS: NonZeroUsize = NonZeroUsize::new(25).expec /// Above base limit will be boosted by specified number for every peer connected starting with /// second peer, such that it scaled with network connectivity, but the exact coefficient might need /// to be tweaked in the future. -pub(crate) const KADEMLIA_CONCURRENT_TASKS_BOOST_PER_PEER: usize = 25; +pub(crate) const KADEMLIA_CONCURRENT_TASKS_BOOST_PER_PEER: usize = 5; /// Base limit for number of any concurrent tasks except Kademlia. /// /// We configure total number of streams per connection to 256. Here we assume half of them might be @@ -80,7 +80,7 @@ const REGULAR_BASE_CONCURRENT_TASKS: NonZeroUsize = /// Above base limit will be boosted by specified number for every peer connected starting with /// second peer, such that it scaled with network connectivity, but the exact coefficient might need /// to be tweaked in the future. -pub(crate) const REGULAR_CONCURRENT_TASKS_BOOST_PER_PEER: usize = 50; +pub(crate) const REGULAR_CONCURRENT_TASKS_BOOST_PER_PEER: usize = 10; const TEMPORARY_BANS_CACHE_SIZE: NonZeroUsize = NonZeroUsize::new(10_000).expect("Not zero; qed"); const TEMPORARY_BANS_DEFAULT_BACKOFF_INITIAL_INTERVAL: Duration = Duration::from_secs(5);