资源描述
Vdbench For Linux
简明操作手册
Vdbench is a disk and tape I/O workload generator for verifying data integrity and measuring performance of direct attached and network connected storage on Windows, Solaris, Linux, AIX, OS/X and HP/UX.
目 录
一、运行环境 3
二、Vdbench目录说明 3
三、Vdbench基础命令介绍 3
四、Vdbench 脚本参数解释 4
1、 存放定义(Storage definition) 4
2、 工作负荷定义(Workload definition) 5
3、 测试运行定义(Run definition) 6
4、 脚本示例 6
一、运行环境
二、Vdbench目录说明
1、 实施程序文件
#./vdbench
2、 软件操作说明文件
#vdbench.pdf
3、 示例脚本文件,及脚本说明
#cd examples
三、Vdbench基础命令介绍
1、 进入Vdbench目录,给Vdbench实施文件给予“777”权限。
#cd /vdbench
#chmod 777 vdbench
2、 实施Vdbench测试命令。
#./vdbench -f ./test/seq_read_sdb -o /testlog/seq_read_sdb_1
命令解释:
命 令
描 述
备 注
./vdbench
测试实施文件
-f
指定测试脚本参数
./test/seq_read_sdb
测试脚本文件路径
-o
指定测试输入参数
/testlog/seq_read_sdb_1
测试结果输入路径
四、Vdbench 脚本参数解释
1、 存放定义(Storage definition)
u raw:裸盘测试。
示例:sd=sd1,lun=/dev/sdb,threads=32,openflags=o_direct
描述:定义一个存放过程(sd),测试磁盘裸设备(/dev/sdb)。
lun=/dev/sdb:指定测试盘符,裸盘路径。
threads=32:设置测试进程队列深度,常见有1、2、4、8、16、32、64等,数值越高表示对磁盘压力越大。
openflags=o_direct:处理缓存方法。“o_direct”使用Linux“O_DIRECT”选项不使用缓存直接写入磁盘。
注意:测试过程组合有:sd、wd、rd
u filesys:文件系统测试。
1、测试单个文件
示例1:sd=sd1,lun=/dir/a.file,size=100m,openflags=o_direct
描述:定义一个存放过程(sd),测试“/div/a.file”文件,设定文件大小为100MB。
lun=/dir/a.file:指定测试一个文件完整路径。
注意:测试过程组合有:sd、wd、rd
2、测试多个文件
示例2:fsd=fsd1,anchor=/dir,depth=1,width=1,files=15,size=128k,openflags=o_direct
描述:定义是文件存放过程(fsd),指定存放路径为“/dir”。
depth=1:路径深度,数值代表文件夹等级。
width=1:每层文件夹下子文件夹数。
files=15:测试最终一层文件夹中将自动生成文件个数。
size=128k:每个测试文件大小。
例:depth=3,width=2,files=15,size=1m
测试最终一层一共生成2^3=8个文件夹,每个文件夹下生成15个文件,共有8*15*1=120MB文件数据。
注意:测试过程组合有:fsd、fwd、rd
fsd参数具体说明:
fsd=name
Unique name for this File System Definition.
fsd=default
All parameters used will serve as default for all the following fsd’s.
count=(nn,mm)
Creates a sequence of FSD parameters.
anchor=/dir/
The name of the directory where the directory structure will be created.
shared=yes/no
Default ‘no’: See FSD sharing
width=nn
How many directories to create in each new directory.
depth=nn
How many levels of directories to create under the anchor.
files=nn
How many files to create in the lowest level of directories.
sizes=(nn,nn,…..)
Specifies the size(s) of the files that will be created.
distribution=all
Default ‘bottom’, creates files only in the lowest directories. ‘all’
creates
Files in all directories.
openflags=(flag,..)
Pass extra flags to (Solaris) file system open request (See: man open)
total_size=nnn
Stop after a total of ‘nnn’ bytes of files have been created.
workingsetsize=nnwss=nn
Causes Vdbench to only use a subset of the total amount of files defined In the file structure. See workingsetsize.
2、 工作负荷定义(Workload definition)
u 测试裸盘,或测试单个文件
示例:wd=wd1,sd=sd*,seekpct=seq,rdpct=100,xfersize=2m
描述:定义一个工作量过程。经过“sd”参数指定前面所定义存放过程,“sd*”表示全部“sd”开头存放过程。
seekpct:random(100) or sequential(0)
* 100% random : seekpct=100
* 100% sequential : seekpct=0
* 20% random : seekpct=20
rdpct:read(100) or write(0)
* 100% read : rdpct=100
* 100% write : rdpct=0
* 70% read : rdpct=70
xfersize:Data transfer size,default 4k
u 测试多个文件
示例:fwd=fwd1,fsd=fsd1,operation=read,xfersize=256k,fileio=sequential,fileselect=sequential,threads=6
fwd参数具体说明:
fwd=name
Unique name for this Filesystem Workload Definition.
fwd=default
All parameters used will serve as default for all the following fwd’s.
fsd=(xx,….)
Name(s) of Filesystem Definitions to use
host=host_label
Which host this workload to run on.
fileio=random
How file I/O will be done: random or sequential
fileio=sequential
How file I/O will be done: random or sequential
fileio=(seq,delete)
Sequential I/O: When opening for writes, first delete the file
stopafter=nnn
For random I/O: stop and close file after ‘nnn’ reads or writes. Default 100 for random I/O.
fileselect=random/ sequential
How to select file names or directory names for processing.
xfersizes=nn
Specifies the data transfer size(s) to use for read and write operations.
operation=xxxx
Specifies a single file system operation that must be done for this workload.
rdpct=nn
For ‘read’ and ‘write’ only. This allows a mix and read and writes against a single file.
skew=nn
The percentage of the total amount of work for this FWD
threads=nn
How many concurrent threads to run for this workload. (Make sure you have at least one file for each thread).
3、 测试运行定义(Run definition)
u 示例:rd=rd1,wd=wd*,elapsed=1800,interval=1,iorate=max
描述:
elapsed:Time of this run in seconds,default 30 seconds
interval:Reporting interval in seconds
iorate:Run an uncontrolled workload
4、 脚本示例
*******************************************************************
* example1:
sd=sd1,lun=/dev/sdb,threads=32,openflags=o_direct
wd=wd1,sd=sd*,seekpct=seq,rdpct=100,xfersize=2m
rd=rd1,wd=wd*,elapsed=600,interval=1,iorate=max
*说明
* 测试磁盘设备(/dev/sdb),队列深度为32,采取2MB块大小,次序读,测试时长为600秒。
*
*******************************************************************
*******************************************************************
* example2:
sd=sd1,lun=/dir/a.file, size=100m,openflags=o_direct
wd=wd1,sd=sd*,seekpct=seq,rdpct=100,xfersize=2m
rd=rd1,wd=wd*,elapsed=600,interval=1,iorate=max
*说明
* 测试读出文件/dir/a.file,设置文件大小为100MB,以2MB块大小次序读出,测试时长为600秒。
*
*******************************************************************
*******************************************************************
* example3:
fsd=fsd1,anchor=/dir,depth=1,width=1,files=30,size=2m,openflags=o_direct
fwd=fwd1,fsd=fsd1,operation=read,xfersize=2m,fileio=sequential,fileselect=sequential,threads=32
rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=600,interval=1
*说明
* 测试读出文件/dir,文件总数为30个,每个文件大小为2MB,以2MB块大小次序读出,测试时长为600秒。
*
*******************************************************************
展开阅读全文