From 0e19bbcd1a58cf4ed05a2c6f0a994c4cbfabe7e3 Mon Sep 17 00:00:00 2001 From: Alexandru Uta Date: Tue, 13 Jun 2023 16:40:45 +0000 Subject: [PATCH] [RUN-670] Double number of queries on application subnets --- rs/execution_environment/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rs/execution_environment/src/lib.rs b/rs/execution_environment/src/lib.rs index f8e55ece30a..e74211ddc73 100644 --- a/rs/execution_environment/src/lib.rs +++ b/rs/execution_environment/src/lib.rs @@ -140,8 +140,18 @@ impl ExecutionServices { Arc::clone(&cycles_account_manager), )); + // If this is not a system or verified subnet we can double the + // number of query execution threads total because the file-backed + // allocator is enabled on these subnets and thus we can fit more + // concurrent queries in memory. + // TODO: remove this once the file-backed allocator is enabled on all subnets. + let query_execution_threads_total = if own_subnet_type == SubnetType::Application { + config.query_execution_threads_total * 2 + } else { + config.query_execution_threads_total + }; let query_scheduler = QueryScheduler::new( - config.query_execution_threads_total, + query_execution_threads_total, config.query_execution_threads_per_canister, config.query_scheduling_time_slice_per_canister, metrics_registry,