From 9db5f0439ec3fc9b8e040f8223539ad03c1be215 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 30 Mar 2026 11:46:49 +0200 Subject: [PATCH] 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 --- cloud-hypervisor/tests/integration.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 07acd2d85..bd4168d77 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -10477,6 +10477,7 @@ mod rate_limiter { const NET_RATE_LIMITER_RUNTIME: u32 = 20; const BLOCK_RATE_LIMITER_RUNTIME: u32 = 20; + const BLOCK_RATE_LIMITER_RAMP_TIME: u32 = 5; // Check if the 'measured' rate is within the expected 'difference' (in percentage) // compared to given 'limit' rate. @@ -10624,7 +10625,8 @@ mod rate_limiter { let fio_command = format!( "sudo fio --filename=/dev/vdc --name=test --output-format=json \ --direct=1 --bs=4k --ioengine=io_uring --iodepth=64 \ - --rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} --numjobs={num_queues}" + --rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} \ + --ramp_time={BLOCK_RATE_LIMITER_RAMP_TIME} --numjobs={num_queues}", ); let output = guest.ssh_command(&fio_command).unwrap(); @@ -10721,7 +10723,8 @@ mod rate_limiter { let mut fio_command = format!( "sudo fio --name=global --output-format=json \ --direct=1 --bs=4k --ioengine=io_uring --iodepth=64 \ - --rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} --numjobs={num_queues}" + --rw={fio_ops} --runtime={BLOCK_RATE_LIMITER_RUNTIME} \ + --ramp_time={BLOCK_RATE_LIMITER_RAMP_TIME} --numjobs={num_queues}", ); // Generate additional argument for each disk: