Increase accounts stack size to 8mb (#25592)

This commit is contained in:
sakridge 2022-06-03 11:46:01 -06:00 committed by GitHub
parent 447a3239e7
commit e6e2058758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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(),