Install ioping on Ubuntu 20.04

Install ioping on Ubuntu 20.04

The ioping is a tool that allows to monitor I/O latency via command line. The ioping displays latency of a storage device in the same way as ping command displays network latency.

This tutorial demonstrates how to install ioping on Ubuntu 20.04.

Install ioping

Make sure the package lists are up-to-date:

sudo apt update

Run the following command to install ioping:

sudo apt install -y ioping

When installation is completed, we can check version of ioping as follows:

ioping -v

Testing ioping

Run the ioping command and give a directory path as argument to start the I/O latency measurement:

ioping -c 6 /tmp

Command prints test results in the following format:

4 KiB <<< /tmp (ext4 /dev/dm-0): request=1 time=334.5 us (warmup)
4 KiB <<< /tmp (ext4 /dev/dm-0): request=2 time=401.2 us
4 KiB <<< /tmp (ext4 /dev/dm-0): request=3 time=397.5 us
4 KiB <<< /tmp (ext4 /dev/dm-0): request=4 time=420.0 us
4 KiB <<< /tmp (ext4 /dev/dm-0): request=5 time=370.0 us
4 KiB <<< /tmp (ext4 /dev/dm-0): request=6 time=958.5 us

--- /tmp (ext4 /dev/dm-0) ioping statistics ---
5 requests completed in 2.55 ms, 20 KiB read, 1.96 k iops, 7.67 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.80 KiB/s
min/avg/max/mdev = 370.0 us / 509.4 us / 958.5 us / 225.1 us

The -c option allows to specify the number of requests. Request size can be provided with -s option. By default, request size is 4 kilobytes.

ioping -c 6 -s 1MB /tmp

Uninstall ioping

If you want to completely remove ioping, execute the following command:

sudo apt purge --autoremove -y ioping

Leave a Comment

Cancel reply

Your email address will not be published.