File system testing - Method 1
Vdbench filesystem testing terminologies:
- Anchor - A directory or a filesystme mount point. A file system structure will be created by specifying the structure information including directory depth, width, number of files and file size. Multiple anchor can be defined and used by filesystem workloads.
- Operation - File system operations. For example, directory create/delete, file create/delete, file read/write, file open/close, setattr and getattr.
Vdbench parameters for filesystem benchmark:
- File system definition(FSD) - Describe the directory structure.
- File system workload definition(FWD) - Describe the workload parameters.
- Run definition(RD) - Describe how the workload will be run.
The following is an example of the vdbench job file.
hd=default,vdbench=/home/tester/vdbench_test,shell=ssh,user=root hd=host1,jvms=1,system=192.168.1.50 fsd=fsd1,anchor=/mnt/testdir1,depth=1,width=1,files=4,size=50g,openflag=o_direct fsd=fsd2,anchor=/mnt/testdir2,depth=1,width=1,files=4,size=50g,openflag=o_direct fwd=fwd1,fsd=fsd1,host=host1,fileio=random,operation=write,xfersize=4k,fileselect=random,threads=$th fwd=fwd2,fsd=fsd2,host=host1,fileio=random,operation=write,xfersize=4k,fileselect=random,threads=$th rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=180,interval=30
hd - it specifies which host to run the filesystem workload. The number of jvms is default to 1. It can be increased if the number of jvms can not handle very high iops with a fast system.
fsd - it specifies under which directory to create the filesystem structures. "depth" defines how many level of directories will be created. "width" defines how many sub-directories will be created under each parent directory. "files" defines how many files will be created under each directory. "size" defines the file size. "openflag" controls how the file will be opened.
fwd - it specifies what workload will be run on the target filesystems. In this example, it will run random write with 4k blocksize. The specified number of threads will be used to write corresponding number of files. The files will be randomly selected for the workload to run. Note that, the number of threads should less than or equal to the number of files. Note that, the writes to the file is single threaded unless "filiio=(random,shared) is specified.
rd - it controls how the workload will be run. In this example, the workload will be run for 3 minutes. The "format" option is very useful. It will recreate the filesystem structure before the workload run. It will give us more repeatable results. "fwdrate" indicates the iorate will be unlimited in order to stress the system as much as possible.
In this example, we run the 4k random write workload concurrently on two filesystems. The number of threads to write each filesystem can be controlled by passing from shell variable during run time as below.
./vdbench jobfile/vdb.job th=2
File system testing - Method 2
The similar workload in the method one can also be run as below.
hd=default,vdbench=/home/tester/vdbench_test,shell=ssh,user=root hd=host1,system=192.168.1.50 sd=sd1,host=host1,lun=/mnt/testdir1/testfile,hitarea=1m,openflag=o_direct,size=50g sd=sd2,host=host1,lun=/mnt/testdir2/testfile,hitarea=1m,openflag=o_direct,size=50g wd=wd1,sd=sd*,seekpct=100 rd=rd1,wd=wd1,iorate=max,rdpct=0,xfersize=4K,elapsed=180,interval=30,th=$th