Vdbench
Installing Vdbench
You need to recompile Vdbench source code before executing Vdbench on an ARM-based server.
- Download the Vdbench package to the /home directory of each client.
https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/utilities_drivers/vdbench/vdbench50407.zip
- Go to the /home directory of each client and decompress the Vdbench package.
1cd /home && unzip vdbench50407.zip
- Install Java.
1yum -y install java
Vdbench depends on Java. If Java has been installed, skip this step.
- Check whether Vdbench is running properly.
1 2 3
cd vdbench50407 chmod +x vdbench ./vdbench -t
If "Vdbench execution completed successfully" is displayed, Vdbench is running properly.
Vdbench Test Model
Vdbench runs by executing a workload configuration file. You only need to execute the workload configuration file on any of the clients. The client automatically logs in to other clients based on the IP addresses of other clients specified in the workload configuration file to perform the test. Before the test, create several RBD images and map them to the local RBDs (/dev/rbd0) on the clients. Vdbench performs read and write tests on the RBDs.
Creating a Vdbench Workload
In this example, one Ceph client is used. The client is mapped to three RBDs. The read/write data size of each RBD is 100 GB. Create a 4 KB Vdbench random read workload on any of the clients (for example, client1).
1
|
vi /home/4k_randread.txt
|
Add the following content:
- Set unified default parameters for all test machines. Change the Vdbench path based on site requirements. In this example, the path is /home/vdbench50406.
1hd=default,vdbench=/home/vdbench50406,user=root,shell=ssh
- Define the test machines.
1hd=hd1,system=client1
Table 1 describes the parameters.
- Define the storage devices.
1 2 3
sd=sd10,host=hd1,lun=/dev/rbd0,openflags=o_direct,threads=16 sd=sd11,host=hd1,lun=/dev/rbd1,openflags=o_direct,threads=16 sd=sd12,host=hd1,lun=/dev/rbd2,openflags=o_direct,threads=16
Table 2 describes the parameters.
Table 2 Parameter description Parameter
Description
sd
The storage device name must be globally unique.
host
ID of the host where the storage device is located.
lun
Raw drive letter or file system name. Vdbench can be used to create a drive. The drive letter in this test is the Ceph RBD/dev/rbd.
openflags
Flag used to open a LUN or file. Generally, this parameter is set to o_direct to bypass the cache mechanism and directly write data to drives.
threads
Maximum number of concurrent I/O requests to the storage device. The default value is 8 and can be changed as required.
- Define the workload.
1wd=wd1,sd=sd*,rdpct=100,seekpct=100,xfersize=4k
Table 3 describes the parameters.
Table 3 Parameter description Parameter
Description
wd
Workload name.
sd
ID of the storage device to be used.
rdpct
Ratio of read requests to total requests.
- rdpct=100: All requests are read requests.
- rdpct=0: All requests are write requests.
seekpct
Random seek percentage.
- seekpct=100: All I/Os are random.
- seekpct=0: All I/Os are sequential.
xfersize
Data block size.
- Define the run.
1rd=rd1,wd=wd1,iorate=max,elapsed=600,format=restart,maxdata=100G,interval=5,warmup=30
Table 4 describes the parameters.
Table 4 Parameter description Parameter
Description
rd
Name of the run.
wd
ID of the workload.
iorate
One or more I/O rates.
- iorate=100: Run 100 I/Os per second.
- iorate=(100,200,…): Run 100 I/Os per second, then 200 I/Os per second, and so on.
- iorate=(100-1000,100): Run 100 I/Os per second, with an increment of 100, until to 1000 I/Os per second.
- iorate=max: I/Os are delivered to the storage device at the maximum I/O rate that the storage system can bear. If different proportions of I/Os are defined, I/Os are delivered at the maximum rate based on the proportions.
elapsed
Running duration, in seconds.
maxdata
Maximum capacity.
interval
Report interval.
warmup
Warm-up duration.
Performing a Vdbench Test
The following uses the 4 KB random read as an example. In other scenarios, adjust the test configuration based on the specific service requirements. (Before performing a read operation, ensure that the block device has data.)
The 4k_randread.txt workload created in Vdbench is used as an example.
1 2 |
cd /home /home/vdbench50406/vdbench -f /home/4k_randread.txt -o 4k_randread_output |
-f specifies the workload configuration file to be tested. -o specifies the directory for storing test results.
Collecting Test Results
After the test is complete, the test results are exported to the output directory created in the current directory. You can set the -o parameter to change the directory for storing the test results.
For example, in Performing a Vdbench Test, the test results are exported to the /home/4k_randread_output directory.
Check the test results.
1 2 |
cd /home/4k_randread_output cat totals.html |
The totals.html file contains the following information (i/o rate indicates the IOPS, MB/sec indicates the bandwidth, and resp time indicates the latency).
