CentosLinuxUbuntu

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

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)

You can also check latency of the disk by this command :

ioping -c 10 -s 1M /tmp

TO Measure disk sequential speed :

ioping -RL /

or by disk name :

ioping -RL /dev/sda

TO measure DISK seek Rate :

ioping -R /

or by disk name :

ioping -R /dev/sda

Sandeep B.

I'm a system admin and php developer and currently working as System Admin In CWP Control panel, expertise in Linux and Windows administration RHEL certified admin.

Related Articles

6 Comments

  1. This is from vps on OVH Singapore server

    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=1 time=7.02 ms (warmup)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=2 time=6.19 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=3 time=8.56 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=4 time=5.42 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=5 time=5.25 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=6 time=5.80 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=7 time=5.01 ms (fast)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=8 time=5.92 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=9 time=7.05 ms
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=10 time=448.2 us (fast)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=11 time=8.38 ms (slow)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=12 time=392.2 us (fast)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=13 time=561.6 us (fast)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=14 time=403.2 us (fast)
    4 KiB <<< . (ext4 /dev/sda1 39.8 GiB): request=15 time=379.7 us (fast)

    — . (ext4 /dev/sda1 39.8 GiB) ioping statistics —
    14 requests completed in 59.8 ms, 56 KiB read, 234 iops, 937.1 KiB/s
    generated 15 requests in 14.0 s, 60 KiB, 1 iops, 4.29 KiB/s
    min/avg/max/mdev = 379.7 us / 4.27 ms / 8.56 ms / 3.02 ms

  2. 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?

  3. 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 ~ #

Leave a Reply

Your email address will not be published.

Back to top button