我要评分
获取效率
正确性
完整性
易理解

Vdbench

You need to recompile Vdbench source code before executing Vdbench on an ARM-based server.

Installing Vdbench

  1. 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

  2. Go to the /home directory of each client and decompress the Vdbench package.
    1
    cd /home && unzip vdbench50407.zip
    
  3. Install Java.
    1
    yum -y install java
    

    Vdbench depends on Java. If Java has been installed, skip this step.

  4. 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.

Creating a Vdbench Workload

This document uses one Ceph client as an example to describe how to use Vdbench to create a 4 KB random read workload on any client (for example, client1).

1
vi /home/4k_randread.txt

Add the following content:

  1. Set unified default parameters for all test machines. Change the Vdbench path based on site requirements. In this example, the path is /home.
    1
    hd=default,vdbench=/home/vdbench50406,user=root,shell=ssh
    
  2. Define the test machines.
    1
    hd=hd1,system=client1
    

    Table 1 describes the parameters.

    Table 1 Parameter description

    Parameter

    Description

    hd

    Name of the test machine.

    system

    IP address or name of the host.

  3. Define the file system.
    1
    fsd=fsd1,anchor=/mnt/cephfs,depth=1,width=10,files=200,size=20m,shared=yes
    

    Table 2 describes the parameters.

    Table 2 Parameter description

    Parameter

    Description

    fsd

    Name of the file system.

    anchor

    Parent directory of the directory structure to be created. It is the CephFS mount point in this example.

    depth

    Number of levels to be created under the locator.

    width

    Number of directories to be created under the locator.

    files

    Number of files to be created at the lowest level.

    size

    Size of a file to be created.

    shared

    fsd parameter shared by all hosts.

  4. Define the file system workload.
    1
    2
    fwd=default,xfersize=4k,fileio=random,fileselect=random,rdpct=100,threads=128 
    fwd=fwd1,fsd=fsd1,host=hd1 
    

    Table 3 describes the parameters.

    Table 3 Parameter description

    Parameter

    Description

    fwd

    Unified default parameter configured for all workloads.

    xfersize

    Data block size.

    fileio

    File I/O type. The value can be random or sequential.

    fileselect

    File or directory selection method. The value can be random or sequential.

    rdpct

    Read/write ratio (%).

    • rdpct=100 indicates that only read requests exist.
    • rdpct=0 indicates that only write requests exist.

    operation

    File system operation. The value can be read or write.

    threads

    Number of concurrent threads of the workload.

    fsd

    ID of the file system to be used.

    host

    ID of the host to be used by the workload.

  5. Define the run.
    1
    rd=rd1,fwd=fwd*,fwdrate=max,format=restart,elapsed=600,interval=5
    

    Table 4 describes the parameters.

    Table 4 Parameter description

    Parameter

    Description

    rd

    Run name.

    fwd

    ID of the file system workload to be used.

    fwdrate

    Number of file system operations performed per second.

    format

    Format of directories and file structures to be preprocessed.

    elapsed

    Running duration in seconds.

    interval

    Report interval.

Performing a Vdbench Test

In this document, a Ceph file system is mounted to the /mnt/cephfs directory on each client by default. This directory has 100 subdirectories, each of which contains 200 files. Each file is 20 MB (you can use dd to write 20 MB). If no test file exists on the client, perform the following steps to create test files:

  1. Create a file generation script.
    1
    vim create_file.sh
    
    1
    2
    3
    4
    5
    6
    7
    8
    #!/bin/bash
    for i in {1..10}
    do
            cd /mnt/cephfs
            mkdir $i
            cd $i
            seq 200 |xargs -i dd if=/dev/zero of={} bs=1024000 count=20
    done
    
  2. Execute the script.
    1
    bash  create_file.sh
    

The 4k_randread.txt workload created in Creating a Vdbench Workload 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).