Site icon VPS Windows

Check the read and write speed of VPS Ubuntu 20.04 hard drive with Fio

check hieu suat bang fio

When you got a new VPS to use, the first thing you need to do is check the hardware specifications to make sure they meet your needs. In this article, we will learn how to check the performance of VPS hard drives using Fio – a popular IOPS meter on all Linux systems. So What is fio? What is IOPS ? and How to check the read and write speed of VPS Ubuntu 20.04 hard drive with Fio

What is Fio?

FIO is a tool use to check the speed of the hard drive: the read and write speed of the hard drive, one of the important factors affecting the performance of the server. The higher the read and write speed, the smoother your server will operate. Just like your computer, if you replace it with a better SSD, it will boot faster.

Fio is a popular IOPS measurement tool on all Linux systems.

What is IOPS?

IOPS (Input/Output Operations per Second) represents the read/write speed on the hard drive in one second, the parameter indicates how many operations can be performed at the same time, the higher the IOPS, the more operations can be performed at the same time, the faster the processing speed.

How to check the read and write speed of VPS Ubuntu 20.04 hard drive with Fio

Usually, we perform the test through the dd command, writing a data file to the hard drive. This command is very popular because it is installed by default on most Linux OS versions and displays intuitive, easy-to-understand information.

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync

Why should you use Fio ?

Although testing read and write speed through the dd command is simpler, there are still many limitations such as:

Thus, to check the performance of the server’s hard drive, the dd command is not the best command and does not cover all the information.

Therefore, in this article, I will introduce How to check the read and write speed of VPS Ubuntu 20.04 hard drive with Fio

How to check the read and write speed of VPS Ubuntu 20.04 hard drive with Fio

FIO is a popular IOPS measurement tool on Linux systems today. To install on Ubuntu 20.04, run the command below:

apt-get update

apt-get install -y fio

The IOPS test process on VPS will check with the following specific parameters:

Check random read & random write simultaneously

If you simply want to compare disk performance between providers, you should use the following test case:

Create a 4GB file, perform simultaneous reading/writing with 4KB blocksize at a ratio of 75% – 25% (ie 3 reads/1 write) and perform 64 tasks at the same time. The 3:1 ratio is very popular and is close to current database types.

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=vps --filename=vpsrandom --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75

It can be seen that the VPS can simultaneously perform 15.1k read operations and 5033 write operations per second. Normally, VPS using SSD hard drives can reach 40,000 reads and 10,000 writes per second

Check for random read speed

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_read.fio --bs=4k --iodepth=64 --size=4G --readwrite=randread

As can be seen, the test server can perform 20.1k reads per second. Typically, SSD hard drives can reach up to 50,000 reads in 1 second while non-SSD hard drives are approximately 2000.

Check for random write speed

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=random_write.fio --bs=4k --iodepth=64 --size=4G --readwrite=randwrite

Here is the result after the system is completed:

It can be seen that the VPS can perform 18.9k writes in 1 second. Normally, SSD hard drives can perform up to 50,000 writes in 1 second while non-SSD hard drives are approximately 2000.

The above is the article Instructions Check the read and write speed of VPS Ubuntu 20.04 hard drive with Fio, wish you a successful operation, if you have any questions about Windows/Linux VPS service, please contact us for advice and register for a free VPS account

Exit mobile version