How to use ioping command.


What is ioping command:

The ioping command is a tool used for measuring I/O (input/output) performance of a storage device, such as a hard drive or a solid-state drive (SSD). It is particularly useful for assessing the responsiveness and latency of storage systems. ioping sends I/O requests to the storage device and measures the time it takes for the requests to be completed.

How to install ioping command:

Installing ioping on a Debian/Ubuntu/Mint Linux
$ sudo apt-get install ioping

Arch Linux install ioping

Execute the following pacman command:
$ sudo pacman -S ioping

Fedora Linux install ioping

Run the following dnf command:
$ sudo dnf install ioping

How do I use ioping?

The syntax is:
ioping /tmp/
ioping /dev/sda1
ioping [options] device/dir/file

See disk I/O latency using the default values and the current directory

$ ioping .
To stop after 12 count, pass the -c option:
$ ioping -c 12 .
Sample outputs from OpenBSD running on Nexonhost server:

4 KiB <<< . (ext4 /dev/vda1): request=1 time=773.8 us (warmup)
4 KiB <<< . (ext4 /dev/vda1): request=2 time=4.51 ms
4 KiB <<< . (ext4 /dev/vda1): request=3 time=749.8 us
4 KiB <<< . (ext4 /dev/vda1): request=4 time=4.35 ms
4 KiB <<< . (ext4 /dev/vda1): request=5 time=4.69 ms
4 KiB <<< . (ext4 /dev/vda1): request=6 time=4.42 ms
4 KiB <<< . (ext4 /dev/vda1): request=7 time=732.1 us (fast)
4 KiB <<< . (ext4 /dev/vda1): request=8 time=704.2 us (fast)
4 KiB <<< . (ext4 /dev/vda1): request=9 time=791.0 us (fast)
4 KiB <<< . (ext4 /dev/vda1): request=10 time=819.4 us (fast)
4 KiB <<< . (ext4 /dev/vda1): request=11 time=4.52 ms
4 KiB <<< . (ext4 /dev/vda1): request=12 time=4.35 ms

--- . (ext4 /dev/vda1) ioping statistics ---
11 requests completed in 30.6 ms, 44 KiB read, 359 iops, 1.40 MiB/s
generated 12 requests in 11.0 s, 48 KiB, 1 iops, 4.36 KiB/s
min/avg/max/mdev = 704.2 us / 2.79 ms / 4.69 ms / 1.85 ms 

To see disk seek rate

$ sudo ioping -R /dev/sda

To see disk sequential speed (MiB/s)

$ sudo ioping -RL /dev/rdisk1

How to set interval between requests

The default is 1 second. To change pass the -i {interval} option. Set 3 seconds:
$ ioping -i 3 .
$ ioping -i 3 /dev/sdb

How do I use asynchronous I/O?

Pass the -A option:
# ioping -c 6 -A /dev/vda1
Sample outputs:

4 KiB <<< /dev/vda1 (block device 23.0 GiB): request=1 time=4.44 ms (warmup)
4 KiB <<< /dev/vda1 (block device 23.0 GiB): request=2 time=819.4 us
4 KiB <<< /dev/vda1 (block device 23.0 GiB): request=3 time=4.37 ms
4 KiB <<< /dev/vda1 (block device 23.0 GiB): request=4 time=4.38 ms
4 KiB <<< /dev/vda1 (block device 23.0 GiB): request=5 time=792.0 us
4 KiB <<< /dev/vda1 (block device 23.0 GiB): request=6 time=4.40 ms

--- /dev/vda1 (block device 23.0 GiB) ioping statistics ---
5 requests completed in 14.8 ms, 20 KiB read, 338 iops, 1.32 MiB/s
generated 6 requests in 5.00 s, 24 KiB, 1 iops, 4.79 KiB/s
min/avg/max/mdev = 792.0 us / 2.95 ms / 4.40 ms / 1.75 ms

How to use cached I/O (no cache flush/drop)

Pass the -C option:
$ ioping -c 6 -C /dev/sdb1
# ioping -c 6 -C .

How to use direct I/O (O_DIRECT)

Pass the -D option:
# ioping -c 6 -D /tmp

How to use write I/O (please read manpage)

Pass the -W option. From the man page:

Safe for directory target. Write I/O gives more reliable results for systems where non-cached reads are not supported or cached at some level. Might be *DANGEROUS* for file/device: it will shred your data. In this case should be repeated tree times (-WWW).

$ ioping -c 6 -W /tmp

How to use read-write ping-pong mode

Pass the -G option:
# ioping -c 10 -G /tmp

How to use use sync I/O (O_SYNC)

Pass the -Y option:
# ioping -c 10 -Y /dev/sdb

How to use use data sync I/O (O_DSYNC)

Pass the -y option:
$ ioping -c 10 -y .

Getting help

Read man page:
$ man ioping
OR
$ ioping -h

At NexonHost, we believe that everyone deserves to have their services and applications be fast, secure, and always available.

Follow us

Quick Links

Newsletter

Be the first who gets our daily news and promotions directly on your email.

Copyright © 2025 . All Rights Reserved To NexonHost.