Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 7006a6f

Browse files
authored
Reduce ConnectionPool size used by send-transaction-service (#33548)
Reduce pool size for ConnectionCache used by send-transaction-service to 2 from 4. No significant slow down of performance from bench-tps testing using rpc-client which is used by send-transaction-service. This will reduce active connections maintained both on the server and client. This will enable us to cache connections for more nodes.
1 parent c929775 commit 7006a6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

connection-cache/src/connection_cache.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use {
2222
const MAX_CONNECTIONS: usize = 1024;
2323

2424
/// Default connection pool size per remote address
25-
pub const DEFAULT_CONNECTION_POOL_SIZE: usize = 4;
25+
pub const DEFAULT_CONNECTION_POOL_SIZE: usize = 2;
2626

2727
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
2828
pub enum Protocol {
@@ -81,6 +81,7 @@ where
8181
connection_config: C,
8282
connection_manager: M,
8383
) -> Self {
84+
info!("Creating ConnectionCache {name}, pool size: {connection_pool_size}");
8485
let (sender, receiver) = crossbeam_channel::unbounded();
8586

8687
let map = Arc::new(RwLock::new(IndexMap::with_capacity(MAX_CONNECTIONS)));

0 commit comments

Comments
 (0)