Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix algorithmic complexity of on-demand scheduler with regards to number of cores. #3190

Merged
merged 35 commits into from
Mar 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fd41678
max -> min
Jan 25, 2024
9ee7aa1
Reduce default queue size on-demand
Jan 25, 2024
0b3c03d
Introduce max max queue size.
Feb 1, 2024
edad3a4
Use max max queue size.
Feb 1, 2024
ee74614
Implementation complete
Feb 1, 2024
16afcfa
Revert min/max fix.
Feb 1, 2024
c750146
Fixes + EncodeableBinaryHeap.
Feb 2, 2024
b0edbcf
Remove EncodeableBinaryHeap
Feb 2, 2024
cac2752
Patch scale-info for now.
Feb 2, 2024
a9b13f7
Revert default value.
Feb 2, 2024
f9ea4e4
Fixes + tests.
Feb 2, 2024
457b225
Bring back copyright.
Feb 2, 2024
ce7c8e8
Fix benchmark.
Feb 2, 2024
1bab42e
binary heap got merged
Feb 2, 2024
c21540d
Calculate on demand traffic on idle blocks
antonva Feb 9, 2024
999b7bb
Add migration for on demand provider
antonva Mar 4, 2024
4df8590
Merge branch 'master' into rk-on-demand-perf-proper-fix
antonva Mar 4, 2024
ecbae81
Readd missing export
antonva Mar 7, 2024
079c78f
Add storage version to on demand pallet
antonva Mar 7, 2024
ee91d8b
Merge branch 'master' into rk-on-demand-perf-proper-fix
antonva Mar 7, 2024
5308f3a
Address comments, add new scale-info
antonva Mar 13, 2024
2253a14
Merge branch 'master' into rk-on-demand-perf-proper-fix
antonva Mar 14, 2024
1ae8b7b
Bump scale-info version again
antonva Mar 14, 2024
3e60c09
Add test to migration to preserve queue ordering
antonva Mar 14, 2024
2dd2512
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
Mar 18, 2024
600fd5e
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Mar 18, 2024
ee29cc2
Fix post_upgrade in migration
antonva Mar 18, 2024
b344bc6
Add prdoc
antonva Mar 18, 2024
76e4e76
Remove unused on-demand max size import
antonva Mar 18, 2024
ab51045
Remove unused mut from test
antonva Mar 18, 2024
9a705cb
Remove benchmark todo
antonva Mar 18, 2024
f2ad19f
Simplify PartialOrd for EnqueuedOrder
antonva Mar 18, 2024
70f468e
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Mar 18, 2024
d8f1543
Address nits
antonva Mar 20, 2024
be3a3c1
Type sums in post migration
antonva Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

//! Autogenerated weights for `runtime_parachains::assigner_on_demand`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-08-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-03-18, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-fljshgub-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-dev")`, DB CACHE: 1024
//! HOSTNAME: `runner-h2rr8wx7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024

// Executed Command:
// target/production/polkadot
Expand All @@ -31,11 +31,11 @@
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot/.git/.artifacts/bench.json
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=runtime_parachains::assigner_on_demand
// --chain=rococo-dev
// --header=./file_header.txt
// --output=./runtime/rococo/src/weights/
// --chain=westend-dev
// --header=./polkadot/file_header.txt
// --output=./polkadot/runtime/westend/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -48,44 +48,44 @@ use core::marker::PhantomData;
/// Weight functions for `runtime_parachains::assigner_on_demand`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> runtime_parachains::assigner_on_demand::WeightInfo for WeightInfo<T> {
/// Storage: `OnDemandAssignmentProvider::SpotTraffic` (r:1 w:0)
/// Proof: `OnDemandAssignmentProvider::SpotTraffic` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Paras::ParaLifecycles` (r:1 w:0)
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::OnDemandQueue` (r:1 w:1)
/// Proof: `OnDemandAssignmentProvider::OnDemandQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::QueueStatus` (r:1 w:1)
/// Proof: `OnDemandAssignmentProvider::QueueStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::ParaIdAffinity` (r:1 w:0)
/// Proof: `OnDemandAssignmentProvider::ParaIdAffinity` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::FreeEntries` (r:1 w:1)
/// Proof: `OnDemandAssignmentProvider::FreeEntries` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `s` is `[1, 9999]`.
fn place_order_keep_alive(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `297 + s * (4 ±0)`
// Estimated: `3762 + s * (4 ±0)`
// Minimum execution time: 33_522_000 picoseconds.
Weight::from_parts(35_436_835, 0)
.saturating_add(Weight::from_parts(0, 3762))
// Standard Error: 129
.saturating_add(Weight::from_parts(14_041, 0).saturating_mul(s.into()))
// Measured: `218 + s * (8 ±0)`
// Estimated: `3681 + s * (8 ±0)`
// Minimum execution time: 21_396_000 picoseconds.
Weight::from_parts(20_585_695, 0)
.saturating_add(Weight::from_parts(0, 3681))
// Standard Error: 127
.saturating_add(Weight::from_parts(20_951, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 8).saturating_mul(s.into()))
}
/// Storage: `OnDemandAssignmentProvider::SpotTraffic` (r:1 w:0)
/// Proof: `OnDemandAssignmentProvider::SpotTraffic` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Paras::ParaLifecycles` (r:1 w:0)
/// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::OnDemandQueue` (r:1 w:1)
/// Proof: `OnDemandAssignmentProvider::OnDemandQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::QueueStatus` (r:1 w:1)
/// Proof: `OnDemandAssignmentProvider::QueueStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::ParaIdAffinity` (r:1 w:0)
/// Proof: `OnDemandAssignmentProvider::ParaIdAffinity` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `OnDemandAssignmentProvider::FreeEntries` (r:1 w:1)
/// Proof: `OnDemandAssignmentProvider::FreeEntries` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `s` is `[1, 9999]`.
fn place_order_allow_death(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `297 + s * (4 ±0)`
// Estimated: `3762 + s * (4 ±0)`
// Minimum execution time: 33_488_000 picoseconds.
Weight::from_parts(34_848_934, 0)
.saturating_add(Weight::from_parts(0, 3762))
// Standard Error: 143
.saturating_add(Weight::from_parts(14_215, 0).saturating_mul(s.into()))
// Measured: `218 + s * (8 ±0)`
// Estimated: `3681 + s * (8 ±0)`
// Minimum execution time: 21_412_000 picoseconds.
Weight::from_parts(19_731_554, 0)
.saturating_add(Weight::from_parts(0, 3681))
// Standard Error: 128
.saturating_add(Weight::from_parts(21_055, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 8).saturating_mul(s.into()))
}
}
Loading