How to Check Linux VPS/Server Disk I/O Speed via this Simple Commands

by Sandeep B.

Now a days who doesn’t want speedy websites, for this you need a good server configuration whether it is VPS or dedicated server all servers have DISK attached to hold your website’s files and data and the Disk I/O (Input/Output) is one of the main requirement for speedy websites i.e. how quickly server can read and write data to it.

A good Disk can give you performance benefits and boost your website’s speed and ranking.

Most server provider now a days provides SSD or SSD cached disk space even some provider also dealing with old magnetic HDD Disk to there clients which can hold data of 100-500 GBs (even TBs), hold on is that worth it?

In this article we’ll check DISK I/O speed of your server (VPS/Dedicated) via this simple commands.

Commands to check DISK I/O speed :

Command 1 :

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync && rm -rf test

eg. output :

[root@vpn ~]# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync && rm -rf test
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 1.95918 s, 548 MB/s

here you can see disk speed is incredibly fast enough “548 MB/s”  as this is pure SSD disk and of course a good Server provider.

If your Disk speed is lower than 80/85 mbps Consider moving to another provider.

Command 2 :

To Check Disk I/O latency using ioping

A tool to monitor I/O latency in real time. It shows disk latency in the same way as ping shows network latency.

Installation on Centos and Ubuntu OS :

Centos

yum install epel-release
yum install ioping

Ubuntu

apt-get install ioping

Run this command to start DISK I/O Latency test:

ioping -c 15 .

eg. output

[root@vpn ~]# ioping -c 15 .
4 KiB <<< . (simfs /dev/simfs): request=1 time=71.9 us (warmup)
4 KiB <<< . (simfs /dev/simfs): request=2 time=111.3 us
4 KiB <<< . (simfs /dev/simfs): request=3 time=99.3 us
4 KiB <<< . (simfs /dev/simfs): request=4 time=131.8 us
4 KiB <<< . (simfs /dev/simfs): request=5 time=134.5 us
4 KiB <<< . (simfs /dev/simfs): request=6 time=102.8 us
4 KiB <<< . (simfs /dev/simfs): request=7 time=116.0 us
4 KiB <<< . (simfs /dev/simfs): request=8 time=117.0 us
4 KiB <<< . (simfs /dev/simfs): request=9 time=117.0 us
4 KiB <<< . (simfs /dev/simfs): request=10 time=112.4 us
4 KiB <<< . (simfs /dev/simfs): request=11 time=122.4 us
4 KiB <<< . (simfs /dev/simfs): request=12 time=97.8 us (fast)
4 KiB <<< . (simfs /dev/simfs): request=13 time=125.6 us
4 KiB <<< . (simfs /dev/simfs): request=14 time=118.8 us
4 KiB <<< . (simfs /dev/simfs): request=15 time=128.6 us

--- . (simfs /dev/simfs) ioping statistics ---
14 requests completed in 1.64 ms, 56 KiB read, 8.56 k iops, 33.4 MiB/s
generated 15 requests in 14.0 s, 60 KiB, 1 iops, 4.29 KiB/s
min/avg/max/mdev = 97.8 us / 116.8 us / 134.5 us / 11.0 us

Here the average I/O Latency is 116.8 milliseconds (lower is better)

If this post helps you in any way please consider a donation

Donate with PayPal :

md-donate

You may also like

4 comments

Kanor August 13, 2020 - 1:13 pm

Hi so i have dedicated server with nvme on hetzner (ubuntu 18.04)

And the result is this
so i have problem with the nvme hardrive because slow unlike yours ?
root@de ~ # ioping -c 15 .
4 KiB from . (ext4 /dev/md2): request=1 time=163 us
4 KiB from . (ext4 /dev/md2): request=2 time=405 us
4 KiB from . (ext4 /dev/md2): request=3 time=410 us
4 KiB from . (ext4 /dev/md2): request=4 time=406 us
4 KiB from . (ext4 /dev/md2): request=5 time=407 us
4 KiB from . (ext4 /dev/md2): request=6 time=422 us
4 KiB from . (ext4 /dev/md2): request=7 time=409 us
4 KiB from . (ext4 /dev/md2): request=8 time=412 us
4 KiB from . (ext4 /dev/md2): request=9 time=412 us
4 KiB from . (ext4 /dev/md2): request=10 time=408 us
4 KiB from . (ext4 /dev/md2): request=11 time=305 us
4 KiB from . (ext4 /dev/md2): request=12 time=362 us
4 KiB from . (ext4 /dev/md2): request=13 time=368 us
4 KiB from . (ext4 /dev/md2): request=14 time=417 us
4 KiB from . (ext4 /dev/md2): request=15 time=410 us

— . (ext4 /dev/md2) ioping statistics —
15 requests completed in 14.0 s, 2.62 k iops, 10.3 MiB/s
min/avg/max/mdev = 163 us / 381 us / 422 us / 65 us
root@de ~ #

Reply
Sandeep B. August 13, 2020 - 5:10 pm

hello
yes seems slow

Reply
jojo September 13, 2020 - 8:31 pm

ioping -c 15 .
4 KiB <<< . (ext4 /dev/vda1): request=1 time=214.9 us (warmup)
4 KiB <<< . (ext4 /dev/vda1): request=2 time=740.6 us
4 KiB <<< . (ext4 /dev/vda1): request=3 time=393.2 us
4 KiB <<< . (ext4 /dev/vda1): request=4 time=318.5 us
4 KiB <<< . (ext4 /dev/vda1): request=5 time=344.4 us
4 KiB <<< . (ext4 /dev/vda1): request=6 time=355.2 us
4 KiB <<< . (ext4 /dev/vda1): request=7 time=346.1 us
4 KiB <<< . (ext4 /dev/vda1): request=8 time=360.6 us
4 KiB <<< . (ext4 /dev/vda1): request=9 time=366.7 us
4 KiB <<< . (ext4 /dev/vda1): request=10 time=375.0 us
4 KiB <<< . (ext4 /dev/vda1): request=11 time=394.7 us
4 KiB <<< . (ext4 /dev/vda1): request=12 time=382.0 us
4 KiB <<< . (ext4 /dev/vda1): request=13 time=383.9 us
4 KiB <<< . (ext4 /dev/vda1): request=14 time=341.2 us
4 KiB <<< . (ext4 /dev/vda1): request=15 time=384.6 us

— . (ext4 /dev/vda1) ioping statistics —
14 requests completed in 5.49 ms, 56 KiB read, 2.55 k iops, 9.97 MiB/s
generated 15 requests in 14.0 s, 60 KiB, 1 iops, 4.29 KiB/s
min/avg/max/mdev = 318.5 us / 391.9 us / 740.6 us / 99.1 us

Please remove the comment was it wrong, and how about this bro? Good or now?

Reply
Sandeep B. September 14, 2020 - 7:47 am

Average usable, but it is slow.

Reply

Leave a Comment