[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Knowledge BaseJanuary 10, 2024

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

Keep reading
How to understand difference between LAN and WAN.
September 6, 2023

How to understand difference between LAN and WAN.

How To Understand Difference Between LAN And WAN. In the world of computer networking, two fundamental types of networks play a pivotal role: Local Area Networks (LANs) and Wide Area Networks (WANs). LANs are the networks you encounter on a daily basis in your home or office, while WANs are…

Read article
Networking Layer Structure: OSI vs. TCP/IP
September 6, 2023

Networking Layer Structure: OSI vs. TCP/IP

Networking Layer Structure: OSI Model Vs. TCP/IP Model Communication between networked devices is a fundamental aspect of today’s interconnected world. To understand and manage this complex process, engineers and network specialists use reference models that divide functions and protocols into…

Read article
Exploring the Differences Between /24 and /27
September 5, 2023

Exploring the Differences Between /24 and /27

Understanding IP Subnetting: Exploring The Differences Between /24 And /27 In the world of networking and IP addressing, subnetting plays a pivotal role in managing and organizing IP addresses effectively. Subnetting allows network administrators to divide a larger IP address space into smaller,…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00