Test file storage performance
Test file storage performance
To fully test file storage performance (read and write IOPS and throughput), use the fio
utility.
Test results can be compared to expected-performance.
Expected performance
Learn more about file-storage types.
Install fio
-
Set
fio
:sudo apt update
sudo apt install fio
Test performance
Select a test:
- random-write-4-kb-blocks — for IOPS testing;
- random-read-4-kb-blocks — for IOPS testing;
- random-write-4-mb-blocks — to test throughput;
- random-read-4-mb-blocks — to test throughput.
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 thefilename=/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)