runsisi's

technical notes

绘制 fio 曲线

2019-11-07 runsisi#ceph

fio 只需要简单的配置即可提供测试过程中的采样数据并记录到日志文件中,可以利用这一特性绘制对应的曲线。

$ vi test.fio
[global]
exitall_on_error

group_reporting

write_bw_log
write_lat_log
write_iops_log

# windowed logging must be enabled when logging latencies, bandwidth, and IOPS
log_avg_msec=1000

time_based
ramp_time=30
runtime=60

ioengine=rbd
clientname=admin
pool=rbd
rbdname=i1

numjobs=1

[8k-read-64]
stonewall
bs=8k
rw=read
iodepth=64

[8k-write-64]
stonewall
bs=8k
rw=write
iodepth=64

[8k-rw-64]
stonewall
bs=8k
rw=rw
rwmixread=70
iodepth=64

[8k-randread-64]
stonewall
bs=8k
rw=randread
iodepth=64

[8k-randwrite-64]
stonewall
bs=8k
rw=randwrite
iodepth=64

[8k-randrw-64]
stonewall
bs=8k
rw=randrw
rwmixread=70
iodepth=64
$ sudo pip3 install pandas matplotlib
$ git clone https://github.com/runsisi/fioplot.git
$ cd fioplot/
$ ./fioplot.py -p '~/fiotest/*' -o .

参考资料

Benchmarking

https://wiki.mikejung.biz/Benchmarking

Fio Manpage

https://fio.readthedocs.io/en/latest/fio_man.html