This topic describes how to use the fio tool to measure the throughput and input/output operations per second (IOPS) of Apsara File Storage NAS.

Performance testing in Linux

Before you conduct performance testing, you must take note of the following items:
  • Ensure that sunrpc_slot has the correct configuration. For more information, see Why is the speed of access to an NFS file system from a Linux client limited to several Mbit/s?.
  • The practical throughput of a file system cannot exceed the maximum bandwidth of an Elastic Compute Service (ECS) instance. If the maximum bandwidth of the ECS instance is 1 Gbit/s, the practical throughput of the file system can reach a maximum of 125 MByte/s.
  • The fio tool is pre-installed on your ECS instance. If the fio tool is not available, you can use the following command to install the tool.
    • If CentOS, RHEL, or Aliyun Linux is running on the ECS instance, use the following command to install the tool.
      sudo yum install fio -y
    • If Ubuntu or Debian is running on the ECS instance, use the following commands to install the tool.
      sudo apt-get update
      sudo apt-get install –f
The following provides several common testing examples.
Note Note: The following estimated values are all based on test results for a single ECS instance. To meet the performance metrics recommended by the NAS official website, we recommend that you use multiple ECS instances to conduct a performance test.
  • Perform a random read test to measure IOPS
    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt

    Estimated value: 14,000

    Random read IOPS
  • Perform a random write test to measure IOPS
    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=4K -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt

    Estimated value: 10,000

    Random write IOPS
  • Perform a random read test to measure throughput
    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randread -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt
    • Estimated value for NAS Capacity: 150 MByte/sRandom read throughput
    • Estimated value for NAS Performance: 300 MByte/s
  • Perform a random write test to measure throughput
    fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=60 -name=Fio -directory=/mnt
    • Estimated value for NAS Capacity: 150 MByte/sRandom write throughput
    • Estimated value for NAS Performance: 300 MByte/s

Performance testing in Windows

You can download an installation package in the msi format from the fio official website and install the package on Windows.

Assume that an NAS file system is mounted on drive Z and the fio tool is installed in the following path C:\Program Files\fio\fio.exe. You can use the following commands to conduct a performance test.

  • Perform a random read test to measure IOPS
    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randread -bs=4K -size=1G -time_based -runtime=60 -group_reporting -thread -filename=Z\:\testfio

    Estimated value: 14,000

    Random read IOPS
  • Perform a random write test to measure IOPS
    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randwrite -bs=4K -size=1G -time_based -runtime=60 -group_reporting -thread -filename=Z\:\testfio

    Estimated value: 10,000

    Random write IOPS
  • Perform a random read test to measure throughput
    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randread -bs=1M -size=1G -time_based -runtime=60 -group_reporting -thread -filename=Z\:\testfio
    • Estimated value for NAS Capacity: 150 MByte/sRandom read throughput
    • Estimated value for NAS Performance: 300 MByte/s
  • Perform a random write test to measure throughput
    "c:\Program Files\fio\fio.exe" -name=Fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=windowsaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=60 -group_reporting -thread -filename=Z\:\testfio
    • Estimated value for NAS Capacity: 150 MByte/sRandom write throughput
    • Estimated value for NAS Performance: 300 MByte/s