From f444f4a4a36fd5ed8ad83ad4b6287102aafab25a Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Fri, 16 Aug 2024 17:21:03 +0300 Subject: [PATCH] Update TransactionExecutorConfig concurrency settings --- vm/rust/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vm/rust/src/lib.rs b/vm/rust/src/lib.rs index 299e4b6966..8acae57ec1 100644 --- a/vm/rust/src/lib.rs +++ b/vm/rust/src/lib.rs @@ -237,12 +237,13 @@ pub extern "C" fn cairoVMExecute( let mut trace_buffer = Vec::with_capacity(10_000); + let n_workers = num_cpus::get() / 2; // Initialize the TransactionExecutor let config = TransactionExecutorConfig { concurrency_config: ConcurrencyConfig { enabled: concurrency_mode, - chunk_size: 10, // adjust chunk size as needed - n_workers: 4, // adjust number of workers as needed + chunk_size: n_workers * 3, + n_workers, }, };