From e6e20587580af9dd199a71ba1a07cedc85bb4a81 Mon Sep 17 00:00:00 2001 From: sakridge Date: Fri, 3 Jun 2022 11:46:01 -0600 Subject: [PATCH] Increase accounts stack size to 8mb (#25592) --- runtime/src/accounts_db.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 3d44794b6..e446aaa3e 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1887,6 +1887,10 @@ impl AccountsDb { // validate inside here Self::bins_per_pass(num_hash_scan_passes); + // Increase the stack for accounts threads + // rayon needs a lot of stack + const ACCOUNTS_STACK_SIZE: usize = 8 * 1024 * 1024; + AccountsDb { filler_accounts_per_slot: AtomicU64::default(), filler_account_slots_remaining: AtomicU64::default(), @@ -1916,6 +1920,7 @@ impl AccountsDb { thread_pool: rayon::ThreadPoolBuilder::new() .num_threads(num_threads) .thread_name(|i| format!("solana-db-accounts-{}", i)) + .stack_size(ACCOUNTS_STACK_SIZE) .build() .unwrap(), thread_pool_clean: make_min_priority_thread_pool(),