Disk I/O Performance Issues

Disk I/O is the third major performance bottleneck that can affect a system or individual job. This section will look first at the tools for monitoring disk I/O and then consider some of the factors that can affect disk I/O performance.

Monitoring Disk I/O Performance

Unfortunately, Unix tools for monitoring disk I/O data are few and rather poor. BSD-like systems provide the iostat command (all but Linux have some version of it). Here is an example of its output from a FreeBSD system experiencing moderate usage on one of its two disks:

$ iostat 6
      tty             ad0              ad1              cd0             cpu
 tin tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   0   13 31.10  71  2.16   0.00   0  0.00   0.00   0  0.00   0  0 11  2 87
   0   13 62.67  46  2.80   0.00   0  0.00   0.00   0  0.00   0  0 10  2 88
   0   13  9.03  64  0.56   0.00   0  0.00   0.00   0  0.00   1  0  7  1 91
   0   13  1.91  63  0.12   0.00   0  0.00   0.00   0  0.00   2  0  4  2 92
   0   13  2.29  64  0.14   0.00   0  0.00   0.00   0  0.00   2  0  5  1 92

The command parameter specifies the interval between reports (and we’ve omitted the first, summary one, as usual). The columns headed by disk names are the most useful for our present purposes. They show current disk usage as the number of transfers/sec (tps) and MB/sec.

System V-based systems offer the sar command, and it can be used to monitor disk I/O. Its syntax in this mode is:

$ sar 
               -d 
               interval [count]

interval is the number of seconds between reports, and count is the total number of reports to produce (the default is one). In general, sar’s options specify what ...

Get Essential System Administration, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.