Skip to content

Commit

Permalink
Run subsystem-benchmark without network latency (paritytech#4068)
Browse files Browse the repository at this point in the history
Implements the idea from
paritytech#3899
- Removed latencies
- Number of runs reduced from 50 to 5, according to local runs it's
quite enough
- Network message is always sent in a spawned task, even if latency is
zero. Without it, CPU time sometimes spikes.
- Removed the `testnet` profile because we probably don't need that
debug additions.

After the local tests I can't say that it brings a significant
improvement in the stability of the results. However, I belive it is
worth trying and looking at the results over time.
  • Loading branch information
AndreiEres committed Apr 11, 2024
1 parent 6ebf491 commit 25f038a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ subsystem-benchmark-availability-recovery:
- .common-refs
- .run-immediately
script:
- cargo bench --profile=testnet -p polkadot-availability-recovery --bench availability-recovery-regression-bench --features subsystem-benchmarks
- cargo bench -p polkadot-availability-recovery --bench availability-recovery-regression-bench --features subsystem-benchmarks
tags:
- benchmark
allow_failure: true
Expand All @@ -542,7 +542,7 @@ subsystem-benchmark-availability-distribution:
- .common-refs
- .run-immediately
script:
- cargo bench --profile=testnet -p polkadot-availability-distribution --bench availability-distribution-regression-bench --features subsystem-benchmarks
- cargo bench -p polkadot-availability-distribution --bench availability-distribution-regression-bench --features subsystem-benchmarks
tags:
- benchmark
allow_failure: true
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use polkadot_subsystem_bench::{
};
use std::io::Write;

const BENCH_COUNT: usize = 50;
const BENCH_COUNT: usize = 5;

fn main() -> Result<(), String> {
let mut messages = vec![];
Expand All @@ -40,6 +40,8 @@ fn main() -> Result<(), String> {
config.n_cores = 10;
config.n_validators = 500;
config.num_blocks = 3;
config.connectivity = 100;
config.latency = None;
config.generate_pov_sizes();
let state = TestState::new(&config);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ use polkadot_subsystem_bench::{
};
use std::io::Write;

const BENCH_COUNT: usize = 50;
const BENCH_COUNT: usize = 5;

fn main() -> Result<(), String> {
let mut messages = vec![];

let options = DataAvailabilityReadOptions { fetch_from_backers: true };
let mut config = TestConfiguration::default();
config.num_blocks = 3;
config.connectivity = 100;
config.latency = None;
config.generate_pov_sizes();

let state = TestState::new(&config);
Expand Down

0 comments on commit 25f038a

Please sign in to comment.