From cd5eefc109764a9c3b299ceface169f6f74064da Mon Sep 17 00:00:00 2001 From: steviez Date: Wed, 27 Mar 2024 16:38:46 -0500 Subject: [PATCH] Adjust the default from num_threads() to a max of 16 --- validator/src/cli/thread_args.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validator/src/cli/thread_args.rs b/validator/src/cli/thread_args.rs index 53d8cf15d984a0..d11b826bddc79d 100644 --- a/validator/src/cli/thread_args.rs +++ b/validator/src/cli/thread_args.rs @@ -110,6 +110,8 @@ impl ThreadArg for ReplayTransactionsThreadsArg { const HELP: &'static str = "Number of threads to use for transaction replay"; fn default() -> usize { - get_max_thread_count() + // Limit to 16 threads, larger values have empirically been found to + // not offer any benefit on machines with more cores + get_max_thread_count().min(16) } }