Test file storage performance
Test file storage performance
For your information
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 following utility fio
.
Test results can be compared to expected performance, which depends on the file storage type. The values can be viewed in the table File storage limits.
1. Install the fio utility
-
Install the utility
fio
:sudo apt update
sudo apt install fio
2. Test performance
Tests can be used:
- random write in 4KB blocks — to test write limits in IOPS;
- random reading in 4KB blocks — to test read limits in IOPS;
- random recording in 4 MB blocks — for bandwidth testing;
- random reading in 4 MB blocks — for bandwidth testing.
Test Parameters:
blocksize
— the size of one block with which a read or write operation is performed;iodepth
— number of streams;filename
— file for writing or reading. The examples below show tests with the parameterfilename=/mnt/nfs/test
— a separate file will be created in the directory with the mounted file storage for testing;size
— total size of the test file. To get relevant results, we recommend performing tests on a 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, see the value of the write limit in IOPS (
IOPS
):write: IOPS=118, BW=475KiB/s (487kB/s)(2000MiB/4310296msec); 0 zone resets
Random reading 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, see the value of the read limit in IOPS (
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 reading 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)