Skip to content

Commit 9db5f04

Browse files
weltlingrbradford
authored andcommitted
tests: Stabilize block rate limiter workloads
Add a ramp time before measuring the block rate limiter tests so both the single device and group workloads are measured after warm up to make the measurements less sensitive to startup transients. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
1 parent 36d6dac commit 9db5f04

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cloud-hypervisor/tests/integration.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10477,6 +10477,7 @@ mod rate_limiter {
1047710477

1047810478
const NET_RATE_LIMITER_RUNTIME: u32 = 20;
1047910479
const BLOCK_RATE_LIMITER_RUNTIME: u32 = 20;
10480+
const BLOCK_RATE_LIMITER_RAMP_TIME: u32 = 5;
1048010481

1048110482
// Check if the 'measured' rate is within the expected 'difference' (in percentage)
1048210483
// compared to given 'limit' rate.
@@ -10624,7 +10625,8 @@ mod rate_limiter {
1062410625
let fio_command = format!(
1062510626
"sudo fio --filename=/dev/vdc --name=test --output-format=json \
1062610627
--direct=1 --bs=4k --ioengine=io_uring --iodepth=64 \
10627-
--rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} --numjobs={num_queues}"
10628+
--rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} \
10629+
--ramp_time={BLOCK_RATE_LIMITER_RAMP_TIME} --numjobs={num_queues}",
1062810630
);
1062910631
let output = guest.ssh_command(&fio_command).unwrap();
1063010632

@@ -10721,7 +10723,8 @@ mod rate_limiter {
1072110723
let mut fio_command = format!(
1072210724
"sudo fio --name=global --output-format=json \
1072310725
--direct=1 --bs=4k --ioengine=io_uring --iodepth=64 \
10724-
--rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} --numjobs={num_queues}"
10726+
--rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} \
10727+
--ramp_time={BLOCK_RATE_LIMITER_RAMP_TIME} --numjobs={num_queues}",
1072510728
);
1072610729

1072710730
// Generate additional argument for each disk:

0 commit comments

Comments
 (0)