How To Test Disk Speed In Linux?

How To Linux Tutorials

January 29, 2021 by Harry Hill

How To Test Disk Speed In Linux

After purchasing the Linux VPS service, you may want to test disk speed in Linux differently distributions. There are different types of disks such as hard disk, SSD, SSD NVMA, M2, and SES. Each of the mentioned disks has different technologies and naturally different speeds. In OperaVPS, we use SSD storage on our servers to provide a better experience to our clients.

To test disk speed in Linux, we use a tool by the name hdparm. This tool is used to manage disks, test them and change the setting of the disks.

Note: You may first want to check hdparm command variables before using them.

Test Disk Speed In Linux CentOS 7

hdparm is not installed by default in CentOS, and you should install it. You may use the below command to install it.

yum install hdparm -y

Install hdparm tool to test disk speed in Linux CentOS

Now, first, we should find the disk name to test the speed. You can list the disks using the below command.

fdisk -l

Iist disks to test disk speed in CentOS 7

As you can see in the below picture, I have 3 disks, and I try to test the disk speed of disk sda1. So I use the below command.

hdparm -t /dev/sda1

The result is that timing buffered disk reads: 1024 MB in 0.54 seconds = 1905.71 MB/sec

Disk speed test result in CentOS

Test Disk Speed In Linux Ubuntu 18

First, we should find the disk name to test the speed. You can list the disks using the below command.

fdisk -l

List disks to test disk speed in Linux Ubuntu 18

As you can see in the below picture, I have 3 disks, and I try to test the disk speed of disk sda1. So I use the below command.

hdparm -t /dev/sda1

Disk speed test result in Ubuntu 18

Test Disk Speed In Linux Debian 10

hdparm is also not installed by default in Debian, and you should install it. You can use the below command to install it.

apt-get install hdparm -y

Install hdparm tool to test disk speed in Linux Debian

First, we should find the disk name to test the speed. You can list the disks using the below command.

fdisk -l

List disks to test disk speed in Linux Debian

As you can see in the below picture, I have 3 disks, and I try to test the disk speed of disk sda1. So I use the below command.

hdparm -t /dev/sda1

Disk speed test result in Debian

Summary

To test disk speed in Linux VPS, you can use a tool by the name hdparm. This article used this tool in 3 distributions of Linux, which are CentOS 7, ubuntu 18, and Debian 10.

I hope you’ve enjoyed this post and found it useful.

Helpful

About the Author Harry Hill

I like to learn and to teach to make things easier

Leave a Reply

Your email address will not be published. Required fields are marked *