Skip to content

Commit

Permalink
Merge branch 'alexuta/double_query_threads' into 'master'
Browse files Browse the repository at this point in the history
[RUN-670] Double number of queries on application subnets

The file backed allocator is enabled now only on application subnets (excluding system and verified application subnets). This means that on application subnets we can now double the total number of query threads because in the worst-case scenario, they will still fit in memory due to the file-backed allocator. 

See merge request dfinity-lab/public/ic!12897
  • Loading branch information
alexandru-uta committed Jun 13, 2023
2 parents fceb080 + 0e19bbc commit 0c34971
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rs/execution_environment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0c34971

Please sign in to comment.