本篇文将简单记录一下FIO,Vdbench的测试脚本
FIO:
参数要求:单进程,粒度4k,directio,随机写,文件大小200m,队列深度20,测试时长10s
fio -ioengine=libaio -bs=4k -direct=1 -rw=randwrite -size=200m -filename=/data/fiofile -name=4k-write -iodepth=20 -runtime=10 -numjobs=1
vdbench 文件系统测试
测试参数要求:2个客户端,每个写入10个100m文件,每个节点线程个数10,测试块大小1m,做读写比1:1的顺序读写,测试时长10s
hd=default,vdbench=/root/vdb,user=root,shell=ssh
hd=hd1,system=10.11.0.1
hd=hd2,system=10.11.0.2
fsd=fsd1,anchor=/data/cccc,depth=1,width=1,files=10,size=100m,shared=yes
fsd=fsd2,anchor=/data/cccc1,depth=1,width=1,files=10,size=100m,shared=yes
fwd=default,xfersize=1024k,fileio=sequential,fileselect=random,threads=10
fwd=fwd1,host=hd1,fsd=fsd1,operation=read
fwd=fwd2,host=hd1,fsd=fsd1,operation=write
fwd=fwd3,host=hd2,fsd=fsd2,operation=read
fwd=fwd4,host=hd2,fsd=fsd2,operation=write
rd=rd1,fwd=fwd*,fwdrate=max,format=restart,elapsed=1200,interval=10
顺序读写不可以用 rdpct
其他测试脚本:
vdbench块设备测试
测试参数要求:
directio模式,每个磁盘数据大小1g,线程个数10,测试块大小4k,做读写比1:1的随机读写,测试时长100s
hd=default,vdbench=/root/vdbench,user=root,shell=ssh
hd=hd1,system=10.11.xxx1
hd=hd2,system=10.11.xxx2
hd=hd3,system=10.11.xxx3
sd=default,openflags=o_direct,size=1GB,threads=10
sd=sd1,hd=hd1,lun=/dev/sdc
sd=sd2,hd=hd2,lun=/dev/sdd
sd=sd3,hd=hd3,lun=/dev/sde
wd=wd1,rdpct=50,seekpct=100,xfersize=4k
rd=default,interval=1,iorate=max
rd=rd1,wd=wd1,sd=sd*,elapsed=100
FIO与Vdbench的异同