【nfs-ganesha】vdbench存储性能测试工具
vdbench存储性能测试工具
vdbench
是一个I/O工作负载生成器,通常用于验证数据完整性和度量直接附加(或网络连接)存储性能。它可以运行在windows、linux环境,可用于测试文件系统或块设备基准性能。
安装部署
1. 部署jdk环境:解压缩jdk安装包至/opt
目录
tar -zxvf jdk-8u251-linux-x64.tar.gz -C /opt/
配置jdk环境变量:
echo 'JAVA_HOME=/opt/jdk1.8.0_251' >> /root/.bashrc
echo 'PATH=$JAVA_HOME/bin:$PATH' >> /root/.bashrc
echo 'CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar' >> /root/.bashrc
source /root/.bashrc
配置面秘钥:非必选项,如需要联机测试,则需要配置此项
示例使用三个客户端联机测试,使用客户端node241
作为主节点
客户端主机名 | 客户端IP |
---|---|
node241 | 66.66.66.241 |
node242 | 66.66.66.242 |
node243 | 66.66.66.243 |
将每个节点IP和主机名的映射关系写入到/etc/hosts
配置文件内
echo '66.66.66.241 node241' >> /etc/hosts
echo '66.66.66.242 node242' >> /etc/hosts
echo '66.66.66.243 node243' >> /etc/hosts
主节点生成公钥文件,并拷贝到其他从节点(配置主节点到从节点免秘钥登录)
ssh-keygen
ssh-copy-id node242
ssh-copy-id node243
vdbench使用:解压缩vdbench安装包至/root/vdbench50406
目录内,切换到vdbench解压缩目录执行对应参数文件即可
unzip vdbench50406.zip -d /root/vdbench50406
常用操作命令:
1. 检查vdbench环境
./vdbench -t
运行测试模型
./vdbench -f {filename} -o {exportpath}
说明:注:-f
后接测试参数文件名,-o
后接导出测试结果路径
建立rsh通信
此命令是用于windows系统多主机联机跑vdbench时使用,因为windows操作系统不支持ssh,因此,vdbench提供了rsh的通信方式。在目标主机上执行此工具后,vdbench将会启动一个java socket用于vdbench slave与master之间通信
./vdbench rsh
data_errors=0
messagescan=no
hd=default,vdbench=/root/sxt,user=root,shell=ssh
hd=hd1,system=10.10.10.10
hd=hd2,system=10.10.10.11
hd=hd3,system=10.10.10.12
#定义文件系统
fsd=default,depth=1,width=12,files=1768,size=64m,shared=yes
fsd=fsd1,anchor=/mnt/sxt/asxt13
fsd=fsd2,anchor=/mnt/sxt/asxt14
fsd=fsd3,anchor=/mnt/sxt/asxt15
# 定义工作负载
fwd=default,openflags=o_direct,threads=64
fwd=fwd1,host=hd1,fsd=fsd1,fileio=sequential,fileselect=sequential
fwd=fwd2,host=hd2,fsd=fsd2,fileio=sequential,fileselect=sequential
fwd=fwd3,host=hd3,fsd=fsd3,fileio=sequential,fileselect=sequential
fwd=fwd4,host=hd1,fsd=fsd1,fileio=random,fileselect=random
fwd=fwd5,host=hd2,fsd=fsd2,fileio=random,fileselect=random
fwd=fwd6,host=hd3,fsd=fsd3,fileio=random,fileselect=random
#定义运行负载
rd=default,fwdrate=max,elapased=48h,interval=5
rd=1m-seq-rw,fwd=(fwd1-fwd3),format=restart,foroperations=(read,write),warmup=30,pause=30,xfersize=1m
rd=1m-randow-rw,fwd=(fwd4-fwd6),format=no,foroperations=(read,write),warmup=30,pause=30,xfersize=1m
rd=4k-seq-rw,fwd=(fwd1-fwd3),format=no,foroperations=(read,write),warmup=30,pause=30,xfersize=4k
rd=4k-seq-rw,fwd=(fwd4-fwd6),format=no,foroperations=(read,write),warmup=30,pause=30,xfersize=4k
参考资料