Setting up the benchmark for NFS and iSCSI

To set up the benchmark for the NFS and iSCSI resources, install and confugure the fio tool, and then mount the resources to all load generators.

Prerequisites

To install fio

  1. On the coordinator node, create a directory to store the fio scripts, for example, /root/scripts.

    # mkdir /root/scripts
  2. Download the fio benchmark scripts to the /root/scripts directory:

    # cd /root/scripts
    # url=https://docs.virtuozzo.com/fio/vm/; \
    wget $url/expand.fio $url/prepare-set.fio $url/randread.fio $url/randrw.fio $url/randwrite.fio $url/seqread.fio $url/seqwrite.fio
  3. If required, install the fio benchmark tool on each load generator and on the coordinator node:

    # yum install fio -y
  4. Ensure that the following parameters in the fio scripts are correct:

    • size is at least twice the target node’s RAM, divided by the node’s CPU cores. For example, for a quad-core node with 16 GiB RAM, the value should be 4g. This parameter sets the total amount of data that each I/O thread will transfer.
    • numjobs is the number of CPU cores. If hyper-threading is enabled, use the number of CPU threads instead. The goal is to fully load the CPU without overcommitting it. For example, on a quad-core node with hyper-threading, the value should be 8. This parameter sets the amount of I/O threads that will be started.
    • directory is the target directory to be tested. For example, if the resource to be tested is mounted to /mnt/test, then update this field accordingly.

    For more options, refer to the fio documentation.

To mount the NFS resource

Mount the NFS resource to each load generator by running the following command:

# mount -t nfs -o vers=4.0 <share_IP>:<share_name> /mnt/test

Where:

  • -o vers=4.0 is the NFS version to use.
  • <target_IP> is the IP address or hostname of the NFS share.
  • <share_name> is the identifier of the NFS share.
  • /mnt/test is the target directory that you specified in the fio scripts.

To mount the iSCSI resource

  1. Access the iSCSI resource by following the detailed instructions in the Storage User Guide.
  2. Mount the iSCSI device to each load generator. As a mount directory, use the target directory that you specified in the fio scripts, for example, /mnt/test.