Test file storage performance
For your information
This guide provides an example of testing file storage performance on a cloud server.
To thoroughly benchmark file storage performance (bandwidth values and read/write limits in IOPS), use the fio utility.
You can compare the test results with the expected performance, which depends on the file storage type. You can view the values in the table Limits and restrictions.
1. Install the fio utility
-
Open the CLI.
-
Install the
fioutility:sudo apt updatesudo apt install fio
2. Test the performance
You can use:
- testing limits in IOPS — random write or read with 4 KB blocks;
- testing bandwidth — random write or read with 4 MB blocks.
Test IOPS limits
Write
Read
-
Open the CLI.
-
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=99GSpecify:
blocksize— size of a single block for the read or write operation;iodepth— number of threads;filename— file for writing or reading. The examples below show tests with the parameterfilename=/mnt/nfs/test— a separate file will be created for testing in the directory with the mounted file storage;size— total size of the test file. To obtain relevant results, we recommend testing on file storage larger than 100 GB.
-
In the test output, see the write limit value in IOPS (
IOPS):write: IOPS=118, BW=475KiB/s (487kB/s)(2000MiB/4310296msec); 0 zone resets
Test throughput
Write
Read
-
Open the CLI.
-
Run the test:
fio \--name=test1 \--blocksize=4M \--rw=write \--direct=1 \--buffered=0 \--ioengine=libaio \--iodepth=16 \--loops=1000 \--runtime=30 \--filename=/mnt/nfs/test \--size=99GSpecify:
blocksize— size of a single block for the read or write operation;iodepth— number of threads;filename— file for writing or reading. The examples below show tests with the parameterfilename=/mnt/nfs/test— a separate file will be created for testing in the directory with the mounted file storage;size— total size of the test file. To obtain relevant results, we recommend testing on file storage larger than 100 GB.
-
In the test output, see the bandwidth value (
BW):write: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19974msec); 0 zone resets