From 6b2ec42e48394a8ffa0dc471ec7b2a9ba2a697c4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 16 Oct 2024 18:50:18 +0200 Subject: [PATCH] docs: clarify max rpc tracing requests (#11796) Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com> --- book/cli/help.rs | 2 +- book/cli/reth/node.md | 4 +++- crates/node/core/src/args/rpc_server.rs | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/book/cli/help.rs b/book/cli/help.rs index e347e1ea5..963f53deb 100755 --- a/book/cli/help.rs +++ b/book/cli/help.rs @@ -320,7 +320,7 @@ fn preprocess_help(s: &str) -> Cow<'_, str> { (r"default: reth/.*/\w+", "default: reth//"), // Remove rpc.max-tracing-requests default value ( - r"(rpc.max-tracing-requests \n.*\n.*\n.*)\[default: \d+\]", + r"(rpc.max-tracing-requests \n.*\n.*\n.*\n.*\n.*)\[default: \d+\]", r"$1[default: ]", ), ]; diff --git a/book/cli/reth/node.md b/book/cli/reth/node.md index 73a8063a8..ea10d9522 100644 --- a/book/cli/reth/node.md +++ b/book/cli/reth/node.md @@ -331,7 +331,9 @@ RPC: [default: 500] --rpc.max-tracing-requests - Maximum number of concurrent tracing requests + Maximum number of concurrent tracing requests. + + By default this chooses a sensible value based on the number of available cores. Tracing requests are generally CPU bound. Choosing a value that is higher than the available CPU cores can have a negative impact on the performance of the node and affect the node's ability to maintain sync. [default: ] diff --git a/crates/node/core/src/args/rpc_server.rs b/crates/node/core/src/args/rpc_server.rs index 15771e989..382f22d37 100644 --- a/crates/node/core/src/args/rpc_server.rs +++ b/crates/node/core/src/args/rpc_server.rs @@ -135,6 +135,11 @@ pub struct RpcServerArgs { pub rpc_max_connections: MaxU32, /// Maximum number of concurrent tracing requests. + /// + /// By default this chooses a sensible value based on the number of available cores. + /// Tracing requests are generally CPU bound. + /// Choosing a value that is higher than the available CPU cores can have a negative impact on + /// the performance of the node and affect the node's ability to maintain sync. #[arg(long = "rpc.max-tracing-requests", alias = "rpc-max-tracing-requests", value_name = "COUNT", default_value_t = constants::default_max_tracing_requests())] pub rpc_max_tracing_requests: usize,