Back to Linux VPS

Check hard drive read/write speed on CentOS 8 with dd command

Check hard drive read/write speed on CentOS 8 with dd command
20 Oct, 2024 Linux VPS

To evaluate the performance of a server, in addition to CPU and RAM configuration, you need to pay attention to another important parameter, which is the read/write speed or I/O (input/output) speed of the hard drive.

The following article will guide you to Check hard drive read/write speed on Centos 8 with dd command

What is hard drive read/write speed?

Hard drive read/write speed is a measure of performance on a storage device, which is the speed of reading and writing data of a drive in real-life usage situations.

In addition to storing data, the hard drive is also directly related to important issues when using a computer such as: computer startup speed, computer data export speed, or any operations on your computer such as copying, cutting and pasting, starting software, … fast or slow depends on whether the hard drive read/write speed is good or not.

Why do you need to know the speed of your hard drive?

In addition to a powerful CPU and RAM, your computer also needs a hard drive with a read-write speed that meets the system’s read-write needs to run smoothly. Suppose the CPU has finished processing a process and requests to write the processed data to the hard drive before continuing the next process. With a slow write speed, the entire system is inevitably “delayed”.

Benefits of checking the read and write speed of a hard drive

Checking the read and write speed of a hard drive is an important process to evaluate the performance and stability of a hard drive in a computer or other data storage device. Here are some important benefits of performing this test:

  • Performance evaluation: Speed ​​testing allows you to evaluate the data processing ability of the hard drive. By knowing the read and write speed, you can evaluate whether the hard drive meets the requirements of the job.
  • Storage Management: Checking the read and write speeds also helps you evaluate the speed at which data can be copied and moved to and from your hard drive. This is useful when you want to back up data or move large files.
  • Detect problems and errors: If the read and write speeds do not meet the hard drive’s specifications, there may be a hardware or operating system problem.
  • Optimize performance: By checking the speed, you can identify factors that can increase or decrease the performance of your hard drive.
  • Ensure reliability: If the hard drive performs consistently during the test, it indicates that the hard drive is working well and there are no issues to worry about.

So how to check hard drive speed, the article below will guide you to check hard drive read/write speed on CentOS 8 with dd command

Check hard drive read/write speed on CentOS 8 with dd command

Use dd – the simplest command to test hard drive speed.

– At the terminal, go to the folder mounted on the hard drive, here is the /mnt folder

# cd /mnt

– Run the following command and wait a moment to get the result:

# dd if=/dev/zero of=test01 bs=1M count=1024

We can see the write speed displayed in the 3rd result line, that speed is the write speed on RAM, that is the maximum speed that the system can reach.

Next, we will use the following command to check the hard drive speed:

# dd if=/dev/zero of=test01 bs=1M count=1024 conv=fdatasync

The difference between the two commands is that the conv=fdatasync parameter indicates that the data is written to the hard drive, not to RAM, which means that with the command without the conv option, the data is only written to RAM.

The server I am running for example has 1GB RAM, I can run the command without the conv option if I use the test01 file with a capacity larger than the RAM capacity:

# dd if=/dev/zero of=test01 bs=1M count=4096

Now you know how fast your hard drive is, the average speed of an HDD is around > 50MB/s which is normal, an SSD is higher.

If your hard drive is over 50MB/s, it can be used normally, over 100MB/s is good.

But if your drive is under 40MB/s, it’s too bad.

Note: You should turn off all other processes to check more accurately

Conclusion

Checking the read/write speed of a hard drive on CentOS 8 with the dd command is very important to evaluate performance and choose a suitable hard drive. Through the testing process, you will better understand the data processing capacity and performance of the hard drive. This helps you make smart decisions when choosing to buy a new hard drive or optimize the performance of your current computer system or server.

If you have any questions about Linux/Windows VPS service, please contact us for advice and register for a free VPS account.

Share on