Test file storage performance
This is a tutorial with an example of testing file storage performance on a cloud server.
To fully test file storage performance (throughput values and read and write limits in IOPS), use the fio
utility.
Test results can be compared with the expected performance, which depends on the type of file storage. Values can be viewed in the File storage limits table.
1. Install the fio utility
-
Open the CLI.
-
Install the
fio
utility:sudo apt update
sudo apt install fio
2. Test performance
Can be used for:
- IOPS limit testing — random write or read in 4KB blocks;
- throughput tests — Random write or read in 4 MB blocks.
Test limits in IOPS
Recording
Reading
-
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 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 parameterfilename=/mnt/nfs/test
— for testing a separate file will be created in the directory with the mounted file storage;size
— total size of the test file. To get relevant results, we recommend performing tests on a file storage larger than 100 GB.
-
In the test output, look for the write limit value in IOPS
(IOPS
):write: IOPS=118, BW=475KiB/s (487kB/s)(2000MiB/4310296msec); 0 zone resets
-
Open the CLI.
-
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=99GSpecify:
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 parameterfilename=/mnt/nfs/test
— for testing a separate file will be created in the directory with the mounted file storage;size
— total size of the test file. To get relevant results, we recommend performing tests on a file storage larger than 100 GB.
-
In the test output, look for the read limit value in IOPS
(IOPS
):read: IOPS=320, BW=1280KiB/s (1311kB/s)(2000MiB/1599899msec)
Test throughput
Recording
Reading
-
Open the CLI.
-
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=99GSpecify:
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 parameterfilename=/mnt/nfs/test
— for testing a separate file will be created in the directory with the mounted file storage;size
— total size of the test file. To get relevant results, we recommend performing tests on a file storage larger than 100 GB.
-
In the test output, look at the throughput
(BW
) value:write: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19974msec); 0 zone resets
-
Open the CLI.
-
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=99GSpecify:
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 parameterfilename=/mnt/nfs/test
— for testing a separate file will be created in the directory with the mounted file storage;size
— total size of the test file. To get relevant results, we recommend performing tests on a file storage larger than 100 GB.
-
In the test output, look at the throughput
(BW
) value:read: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19911msec)