fio磁盘读写测试
指尖二进制 • 1 年前 • 759 次点击 • LINUX
测试随机读写
fio -filename=/dev/vda -direct=1 -iodepth 1 -thread -rw=randrw -ioengine=psync -bs=4k -size=1G -numjobs=10 -runtime=60 -group_reporting -name=mytest
参数
rw=randread 测试随机读的I/O
rw=randwrite 测试随机写的I/O
rw=randrw 测试随机混合写和读的I/O
rw=read 测试顺序读的I/O
rw=write 测试顺序写的I/O
rw=rw 测试顺序混合写和读的I/O
valid values: read Sequential read
: write Sequential write
: trim Sequential trim
: randread Random read
: randwrite Random write
: randtrim Random trim
: rw Sequential read and write mix
: readwrite Sequential read and write mix
: randrw Random read and write mix
: trimwrite Trim and write mix, trims preceding writes
深度1测试
顺序读
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=read -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_read
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=read -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_read
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=read -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_read
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=read -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_read
随机读
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randread -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_randread
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randread -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_randread
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randread -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_randread
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randread -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_randread
顺序写
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=write -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_write
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=write -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_write
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=write -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_write
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=write -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_write
随机写
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randwrite -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_randwrite
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randwrite -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_randwrite
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randwrite -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_randwrite
fio -ioengine=libaio -direct=1 -iodepth 1 -thread -rw=randwrite -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_randwrite
深度8测试(涛)
顺序读
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=read -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_read
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=read -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_read
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=read -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_read
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=read -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_read
随机读
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randread -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_randread
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randread -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_randread
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randread -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_randread
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randread -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_randread
顺序写
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=write -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_write
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=write -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_write
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=write -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_write
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=write -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_write
随机写
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randwrite -filename=/dev/sdh -bs=4k -numjobs=8 -runtime=60 -group_reporting -name=4KB_randwrite
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randwrite -filename=/dev/sdh -bs=8k -numjobs=8 -runtime=60 -group_reporting -name=8KB_randwrite
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randwrite -filename=/dev/sdh -bs=64k -numjobs=8 -runtime=60 -group_reporting -name=64KB_randwrite
fio -ioengine=libaio -direct=1 -iodepth 8 -thread -rw=randwrite -filename=/dev/sdh -bs=128k -numjobs=8 -runtime=60 -group_reporting -name=128KB_randwrite