mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 02:11:07 +00:00
Plumbing to increase pvf workers configuration based on chain id (#4252)
Part of https://github.com/paritytech/polkadot-sdk/issues/4126 we want to safely increase the execute_workers_max_num gradually from chain to chain and assess if there are any negative impacts. This PR performs the necessary plumbing to be able to increase it based on the chain id, it increase the number of execution workers from 2 to 4 on test network but lives kusama and polkadot unchanged until we gather more data. --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
committed by
GitHub
parent
0a56d071c7
commit
9a0049d0da
@@ -643,6 +643,13 @@ pub struct NewFullParams<OverseerGenerator: OverseerGen> {
|
||||
pub workers_path: Option<std::path::PathBuf>,
|
||||
/// Optional custom names for the prepare and execute workers.
|
||||
pub workers_names: Option<(String, String)>,
|
||||
/// An optional number of the maximum number of pvf execute workers.
|
||||
pub execute_workers_max_num: Option<usize>,
|
||||
/// An optional maximum number of pvf workers that can be spawned in the pvf prepare pool for
|
||||
/// tasks with the priority below critical.
|
||||
pub prepare_workers_soft_max_num: Option<usize>,
|
||||
/// An optional absolute number of pvf workers that can be spawned in the pvf prepare pool.
|
||||
pub prepare_workers_hard_max_num: Option<usize>,
|
||||
pub overseer_gen: OverseerGenerator,
|
||||
pub overseer_message_channel_capacity_override: Option<usize>,
|
||||
#[allow(dead_code)]
|
||||
@@ -738,6 +745,9 @@ pub fn new_full<
|
||||
overseer_message_channel_capacity_override,
|
||||
malus_finality_delay: _malus_finality_delay,
|
||||
hwbench,
|
||||
execute_workers_max_num,
|
||||
prepare_workers_soft_max_num,
|
||||
prepare_workers_hard_max_num,
|
||||
}: NewFullParams<OverseerGenerator>,
|
||||
) -> Result<NewFull, Error> {
|
||||
use polkadot_node_network_protocol::request_response::IncomingRequest;
|
||||
@@ -943,6 +953,16 @@ pub fn new_full<
|
||||
secure_validator_mode,
|
||||
prep_worker_path,
|
||||
exec_worker_path,
|
||||
pvf_execute_workers_max_num: execute_workers_max_num.unwrap_or_else(
|
||||
|| match config.chain_spec.identify_chain() {
|
||||
// The intention is to use this logic for gradual increasing from 2 to 4
|
||||
// of this configuration chain by chain untill it reaches production chain.
|
||||
Chain::Polkadot | Chain::Kusama => 2,
|
||||
Chain::Rococo | Chain::Westend | Chain::Unknown => 4,
|
||||
},
|
||||
),
|
||||
pvf_prepare_workers_soft_max_num: prepare_workers_soft_max_num.unwrap_or(1),
|
||||
pvf_prepare_workers_hard_max_num: prepare_workers_hard_max_num.unwrap_or(2),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user