@@ -49,24 +49,24 @@ def run_fio(microvm, mode, block_size):
4949 cmd = (
5050 CmdBuilder ("fio" )
5151 .with_arg (f"--name={ mode } -{ block_size } " )
52+ .with_arg (f"--numjobs={ microvm .vcpus_count } " )
53+ .with_arg (f"--runtime={ RUNTIME_SEC } " )
54+ .with_arg ("--time_based=1" )
55+ .with_arg (f"--ramp_time={ WARMUP_SEC } " )
56+ .with_arg ("--filename=/dev/vdb" )
57+ .with_arg ("--direct=1" )
5258 .with_arg (f"--rw={ mode } " )
59+ .with_arg ("--randrepeat=0" )
5360 .with_arg (f"--bs={ block_size } " )
54- .with_arg ("--filename=/dev/vdb" )
55- .with_arg ("--time_based=1" )
5661 .with_arg (f"--size={ BLOCK_DEVICE_SIZE_MB } M" )
57- .with_arg ("--direct=1" )
5862 .with_arg ("--ioengine=libaio" )
5963 .with_arg ("--iodepth=32" )
60- .with_arg (f"--ramp_time={ WARMUP_SEC } " )
61- .with_arg (f"--numjobs={ microvm .vcpus_count } " )
6264 # Set affinity of the entire fio process to a set of vCPUs equal in size to number of workers
6365 .with_arg (
6466 f"--cpus_allowed={ ',' .join (str (i ) for i in range (microvm .vcpus_count ))} "
6567 )
6668 # Instruct fio to pin one worker per vcpu
6769 .with_arg ("--cpus_allowed_policy=split" )
68- .with_arg ("--randrepeat=0" )
69- .with_arg (f"--runtime={ RUNTIME_SEC } " )
7070 .with_arg (f"--write_bw_log={ mode } " )
7171 .with_arg ("--log_avg_msec=1000" )
7272 .with_arg ("--output-format=json+" )
0 commit comments