Skip to content

Commit

Permalink
Adjust the default from num_threads() to a max of 16
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez committed Mar 27, 2024
1 parent 10d0677 commit cd5eefc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion validator/src/cli/thread_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit cd5eefc

Please sign in to comment.