我可以在已安装的设备上使用 fio 吗?

我可以在已安装的设备上使用 fio 吗?

我正在使用 fio 获取各种存储配置的一些广泛读取的 IOPS 性能数据,如下所示:

fio --name=readiops --filename=/dev/md1 --direct=1 --rw=randread --bs=4k --numjobs=4 --iodepth=32 --direct=1 --iodepth_batch=16 --iodepth_batch_complete=16 \
    --runtime=100 --ramp_time=5 --norandommap --time_based --ioengine=libaio --group_reporting
readiops: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=32
...
fio-2.1.11
Starting 4 processes
Jobs: 4 (f=4): [r(4)] [100.0% done] [3504MB/0KB/0KB /s] [897K/0/0 iops] [eta 00m:00s]
readiops: (groupid=0, jobs=4): err= 0: pid=10458: Thu Jan 15 05:49:28 2015
...

我想将我得到的数据与在安静时间生产中使用的数组进行比较,是否可以在不影响数组上数据的情况下做到这一点?

有一个--readonly选项(由于某种原因重复)man页面中但我并不是 100% 清楚这就是我所追求的:

--readonly
启用只读安全检查。
...
--readonly
打开安全只读检查,防止任何尝试写入。

答案1

也许还有另一种方法,但我们最终决定为已安装阵列上的大文件创建一个环回设备,然后对其运行测试:

fio --name=readiops --filename=/dev/loop0 --direct=1 --rw=randread --bs=4k --numjobs=4 --iodepth=32 --direct=1 --iodepth_batch=16 --iodepth_batch_complete=16 \
    --runtime=100 --ramp_time=5 --norandommap --time_based --ioengine=libaio --group_reporting

相关内容