Skip to main content
Test file storage performance
Last update:

Test file storage performance

To fully test file storage performance (read and write IOPS and throughput), use the fio utility.

  1. Install the fio utility.
  2. Test performance.

Test results can be compared to expected-performance.

Expected performance

HDD BasicSSD UniversalSSD Fast
Throughput
(read, 4 MB blocks)
40 MB/s (for NFS)
100 MB/s (for CIFS)
200 MB/s300 MB/s
Throughput
(write, 4 MB blocks)
100 MB/s200 MB/s500 MB/s
Number of operations
(read, 4 KB blocks)
320 IOPS7000 IOPS25000 IOPS
Number of operations
(write, 4 KB blocks)
120 IOPS4000 IOPS15000 IOPS

Learn more about file-storage types.

Install fio

  1. Connect to server.

  2. Set fio:

    sudo apt update
    sudo apt install fio

Test performance

Select a test:

Test Parameters:

  • blocksize — the size of one block with which a read or write operation is performed;
  • iodepth — number of threads;
  • filename — file to write or read. The examples below show tests with the filename=/mnt/nfs/test parameter — a separate file will be created for the test in the directory with the mounted file storage;
  • size — total size of the test file. To get relevant results, we recommend running the test on file storage larger than 100 GB.

Random recording in 4KB blocks

Run the test:

fio\
--name=test1\
--blocksize=4k\
--rw=randwrite\
--direct=1\
--buffered=0\
--ioengine=libaio\
--iodepth=16\
--loops=1000\
--runtime=30\
--filename=/mnt/nfs/test\
--size=99G

In the test output, look for the IOPS value (IOPS):

write: IOPS=118, BW=475KiB/s (487kB/s)(2000MiB/4310296msec); 0 zone resets

Random read in 4KB blocks

Run the test:

fio\
--name=test1\
--blocksize=4k\
--rw=randread\
--direct=1\
--buffered=0\
--ioengine=libaio\
--iodepth=16\
--loops=1000\
--runtime=30\
--filename=/mnt/nfs/test\
--size=99G

In the test output, look for the IOPS value (IOPS):

read: IOPS=320, BW=1280KiB/s (1311kB/s)(2000MiB/1599899msec)

Random recording in 4 MB blocks

Run the test:

fio\
--name=test1\
--blocksize=4M\
--rw=randwrite\
--direct=1\
--buffered=0\
--ioengine=libaio\
--iodepth=16\
--loops=1000\
--runtime=30\
--filename=/mnt/nfs/test\
--size=99G

In the test output, look at the throughput value (BW):

write: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19974msec); 0 zone resets

Random read in 4 MB blocks

Run the test:

fio\
--name=test1\
--blocksize=4M\
--rw=randread\
--direct=1\
--buffered=0\
--ioengine=libaio\
--iodepth=16\
--loops=1000\
--runtime=30\
--filename=/mnt/nfs/test\
--size=99G

In the test output, look at the throughput value (BW):

Read: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19911msec)