LinuxCommandLibrary

ioping

Measure disk I/O latency

TLDR

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

$ ioping .
copy

Measure latency on /tmp using 10 requests of 1 megabyte each
$ ioping [[-c|-count]] 10 [[-s|-size]] 1M /tmp
copy

Measure disk seek rate on /dev/sdX
$ ioping [[-R|-rapid]] [/dev/sdX]
copy

Measure disk sequential speed on /dev/sdX
$ ioping [[-RL|-rapid -linear]] [/dev/sdX]
copy

SYNOPSIS

ioping [options] [target]

PARAMETERS

-c count
    Send count I/O requests and exit.

-s size
    Set the I/O request size to size bytes (default is 4k).

-i interval
    Set the interval between I/O requests to interval seconds.

-w seconds
    Specify a warm-up period of seconds seconds before measuring latency.

-r
    Perform random I/O requests (default is sequential).

-d
    Target a specific disk device for direct I/O access (requires root).

-B
    Use buffered I/O instead of direct I/O.

-q
    Be quiet and only show summary information.

-t timeout
    Set a timeout of timeout seconds for each I/O request.

-n
    Perform no actual I/O, just calculate the overhead. Useful for debugging.

-D
    Enable detailed output

[target]
    The target directory or device to perform I/O against (defaults to the current directory).

DESCRIPTION

ioping is a simple command-line utility to measure I/O latency and disk performance. It sends I/O requests to a specified target (defaulting to the current directory) and reports the latency of each request. It is a useful tool for quickly assessing the responsiveness of storage devices, helping to identify potential I/O bottlenecks.

Unlike traditional disk benchmarks that focus on throughput, ioping primarily focuses on latency. It can simulate random reads or sequential reads, and allows adjusting the block size and the number of I/O operations. The output provides statistics like minimum, average, and maximum latency, as well as the number of operations completed. This information is crucial for understanding the real-world impact of disk performance on applications that rely on fast I/O operations. It's often used to pinpoint issues causing application slowness due to I/O delays. ioping requires root privileges for direct disk access, however you can run as a regular user for file system access.

CAVEATS

Direct disk access (-d option) requires root privileges. Results on virtualized environments may not accurately reflect the underlying hardware's performance due to virtualization overhead. Be careful when testing direct disk access (-d) to not destroy important data.

INTERPRETING RESULTS

The output of ioping typically includes the minimum, average, and maximum I/O latency, as well as the number of I/O operations performed. Lower latency values indicate better performance. Significant variations between minimum and maximum latency might suggest inconsistent performance or potential bottlenecks.

For example, if a file is being fragmented, you will likely see much more variance in latency with random reads.

USE CASES

ioping can be used to:

  • Identify slow disks.
  • Troubleshoot application performance issues related to I/O.
  • Compare the performance of different storage devices.
  • Monitor disk latency over time.

HISTORY

ioping was developed to provide a simple and easy-to-use tool for quickly assessing I/O latency. It has gained popularity among system administrators and developers for diagnosing I/O performance issues in a variety of environments. The command continues to be maintained with updates focused on improving accuracy and adding new features.

SEE ALSO

hdparm(8), dd(1), fio(1)

Copied to clipboard