@@ -49,24 +49,24 @@ def run_fio(microvm, mode, block_size):
49
49
cmd = (
50
50
CmdBuilder ("fio" )
51
51
.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" )
52
58
.with_arg (f"--rw={ mode } " )
59
+ .with_arg ("--randrepeat=0" )
53
60
.with_arg (f"--bs={ block_size } " )
54
- .with_arg ("--filename=/dev/vdb" )
55
- .with_arg ("--time_based=1" )
56
61
.with_arg (f"--size={ BLOCK_DEVICE_SIZE_MB } M" )
57
- .with_arg ("--direct=1" )
58
62
.with_arg ("--ioengine=libaio" )
59
63
.with_arg ("--iodepth=32" )
60
- .with_arg (f"--ramp_time={ WARMUP_SEC } " )
61
- .with_arg (f"--numjobs={ microvm .vcpus_count } " )
62
64
# Set affinity of the entire fio process to a set of vCPUs equal in size to number of workers
63
65
.with_arg (
64
66
f"--cpus_allowed={ ',' .join (str (i ) for i in range (microvm .vcpus_count ))} "
65
67
)
66
68
# Instruct fio to pin one worker per vcpu
67
69
.with_arg ("--cpus_allowed_policy=split" )
68
- .with_arg ("--randrepeat=0" )
69
- .with_arg (f"--runtime={ RUNTIME_SEC } " )
70
70
.with_arg (f"--write_bw_log={ mode } " )
71
71
.with_arg ("--log_avg_msec=1000" )
72
72
.with_arg ("--output-format=json+" )
0 commit comments