fio stands for Flexible IO Tester, which is a block volume performance testing tool based on Linux instances.
https://docs.oracle.com/en-us/iaas/Content/Block/References/samplefiocommandslinux.htm
The testing command is as follows:
fio -filename=/tmp/test.file \
-direct=1 \
-iodepth 1 \
-thread -rw=randrw \
-rwmixread=70 \
-ioengine=psync \
-bs=4k \
-size=2G \
-numjobs=10 \
-runtime=60 \
-group_reporting \
-name=test_r_w
Run the following command directly to test random read:
fio -filename=/tmp/test.file \
-direct=1 \
-rw=randread \
-bs=4k \
-ioengine=libaio \
-iodepth=256 \
-runtime=120 \
-numjobs=4 \
-time_based \
-group_reporting \
-name=iops-test-job \
-eta-newline=1 \
-readonly
Run the following command on the mount point to test file read/write:
fio -filename=/tmp/test.file \
-size=500GB \
-direct=1 \
-rw=randrw \
-bs=4k \
-ioengine=libaio \
-iodepth=256 \
-runtime=120 \
-numjobs=4 \
-time_based \
-group_reporting \
-name=iops-test-job \
-eta-newline=1
Do not use write workloads such as readwrite, randrw, write, and trimwrite directly on devices that are in use.
Run the following command to test random read/write:
fio -filename=device name \
-direct=1 \
-rw=randrw \
-bs=4k \
-ioengine=libaio \
-iodepth=256 \
-runtime=120 \
-numjobs=4 \
-time_based \
-group_reporting \
-name=iops-test-job \
-eta-newline=1
Run the following command to test sequential read:
fio -filename=device name \
-direct=1 \
-rw=read \
-bs=4k \
-ioengine=libaio \
-iodepth=256 \
-runtime=120 \
-numjobs=4 \
-time_based \
-group_reporting \
-name=iops-test-job \
-eta-newline=1 \
-readonly
Others include:
Test random reads 测试随机读数
Test file random read/writes 测试文件随机读/写
Test random read/writes 测试随机读/写
Test sequential reads 测试顺序读取
文章评论