我正在使用 fio 来测试我的服务器可以提供多少 iops。我的配置文件说要写入一个 20GB 的文件并读取它。结果显示 iops=27291。但测试只持续了 10 秒。我想知道如果测试持续 2 小时,我是否会得到有关我的服务器 IOPS 的更准确的结果。
# cat fio/fio-readwrite-20g.fio
[global]
ioengine=posixaio
rw=readwrite
size=20g
directory=/home/ustore/fio
thread=10
write_bw_log=fio-test
write_iops_log=fio-test
write_lat_log=fio-test
[fio-readwrite-20g]
答案1
阅读手册页
runtime=int
Terminate processing after the specified number of seconds.
time_based
If given, run for the specified runtime duration even if the files
are completely read or written. The same workload will
be repeated as many times as runtime allows.