Test disk performance
Linux
Windows
To fully test cloud server disk performance (read and write IOPS and throughput), use the fio
utility. You can use file tests — prepared text files with test settings — for testing.
Test results can be compared to the limits for network disks and local disks.
1. Install the fio utility
-
Install the
fio
utility:sudo apt update
sudo apt install fio
2. Prepare the disk for testing
Do not use a disk that contains any information for testing — all data on the disk will be destroyed in preparation for testing.
You can use a separate file on the disk for tests, but the result may not be representative, especially if you are using a root partition.
To exclude the influence of services and file system performance on the test result, we recommend creating an empty network disk and filling it with data.
-
Look at the name of the blank disk:
lsblk
A list of cloud server disks will appear in the response. Copy the name of an empty disk.
-
Fill the empty disk with data:
dd if=/dev/urandom of=/dev/<sdX> bs=4M
Specify
<sdX>
is the name of the blank disk you copied in step 3.
3. Test performance
Can be used for:
- IOPS testing — random write or read in 4KB blocks;
- throughput tests — Random write or read in 4 MB blocks.
Test IOPS
Recording
Reading
-
Open the CLI.
-
Create a test file in the
nano
text editor:nano write.ini
-
Add content to the test file:
[writetest]
size=2000M
blocksize=4k
filename=/dev/sdb
rw=randwrite
direct=1
buffered=0
ioengine=libaio
iodepth=32Here:
size
— total file size for testing;blocksize
— size of one block of data for testing;filename
— path to the file to be used for testing. The example above shows a test with writing to disk with the parameterfilename=/dev/sdb
;iodepth
— number of threads.
-
Exit the
nano
text editor with your changes saved: press Ctrl+X and then Y+Enter. -
Run the test:
fio write.ini
In the output of the test, look at the IOPS value. Example output:
write: IOPS=118, BW=475KiB/s (487kB/s)(2000MiB/4310296msec); 0 zone resets
-
Open the CLI.
-
Create a test file in the
nano
text editor:nano read.ini
-
Add content to the test file:
[readtest]
size=2000M
blocksize=4k
filename=/dev/sdb
rw=randread
direct=1
buffered=0
ioengine=libaio
iodepth=32Here:
size
— total file size for testing;blocksize
— size of one block of data for testing;filename
— path to the file to be used for testing. The example above shows a test with writing to disk with the parameterfilename=/dev/sdb
;iodepth
— number of threads.
-
Exit the
nano
text editor with your changes saved: press Ctrl+X and then Y+Enter. -
Run the test:
fio read.ini
In the output of the test, look at the IOPS value. Example output:
read: IOPS=320, BW=1280KiB/s (1311kB/s)(2000MiB/1599899msec)
Test throughput
Recording
Reading
-
Open the CLI.
-
Create a test file in the
nano
text editor:nano write.ini
-
Add content to the file:
[writetest]
size=2000M
blocksize=4M
filename=/dev/sdb
rw=write
direct=1
buffered=0
ioengine=libaio
iodepth=32Here:
size
— total size of the test file;blocksize
— the size of one block with which a read or write operation is performed;filename
— file to write or read. The examples below show tests with writing to disk with the parameterfilename=/dev/sdb
— writing will also destroy data and file system on the disk, if any;iodepth
— number of threads.
-
Exit the
nano
text editor with your changes saved: press Ctrl+X and then Y+Enter. -
Run the test:
fio write.ini
In the test output, look at the throughput (BW) value. Example output:
write: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19974msec); 0 zone resets
-
Open the CLI.
-
Create a test file in the
nano
text editor:nano read.ini
-
Add content to the file:
[readtest]
size=2000M
blocksize=4M
filename=/dev/sdb
rw=read
direct=1
buffered=0
ioengine=libaio
iodepth=32Here:
size
— total size of the test file;blocksize
— the size of one block with which a read or write operation is performed;filename
— file to write or read. The examples below show tests with writing to disk with the parameterfilename=/dev/sdb
— writing will also destroy data and file system on the disk, if any;iodepth
— number of threads.
-
Exit the
nano
text editor with your changes saved: press Ctrl+X and then Y+Enter. -
Run the test:
fio read.ini
In the test output, look at the throughput (BW) value. Example output:
read: IOPS=25, BW=100MiB/s (105MB/s)(2000MiB/19911msec)
To fully test cloud server disk performance (read/write IOPS and throughput), use the CrystalDiskMark utility. We recommend testing on an additional cloud server disk.
Test results can be compared to the limits for network disks and local disks.
1. Install the CrystalDiskMark utility
-
Download CrystalDiskMark.
-
Run the installer.
-
Follow the steps to install the utility.
2. Test performance
Before testing, terminate third-party application processes or reboot into Safe Mode. We recommend testing on an additional disk.
Can be used for:
- IOPS testing — random write and read in 4KB blocks;
- throughput testing — random write and read in 4 MB blocks.
Test IOPS
-
Run CrystalDiskMark.
-
Go to Profile.
-
Select Demo.
-
Go to Settings → Settings.
-
In the Profile:Demo block:
5.1 In the Type column select the test type — RND. This test type is responsible for random reading and writing.
5.2 In the Block Size column select the block size for testing — 4KiB.
5.3. In the Queues column, select the depth of the request queue for testing — 32.
5.4. In the Threads column, select the number of load threads — 1.
-
Press OK.
-
In units of measure, select IOPS.
-
Press ALL. Disk IOPS testing starts.
-
In the test output, look at the read and write IOPS value. Example output:
Read 325 IOPS
Write 121 IOPS
Test throughput
-
Run CrystalDiskMark.
-
Go to Profile.
-
Select Demo.
-
Go to Settings → Settings.
-
In the Profile:Demo block:
5.1 In the Type column, select the test type — SEQ. This test type is responsible for sequential reading and writing.
5.2 In the Block Size column select the block size for testing — 4MiB.
5.3. In the Queues column, select the depth of the request queue for testing — 32.
5.4. In the Threads column, select the number of boot threads — 1.
-
Press OK.
-
Select MB/s in the units of measure.
-
Press ALL. The disk throughput test will start.
-
In the test output, see the read and write throughput value. Example output:
Read 106.5 MB/s
Write 95.6 MB/s