Section 4.6. iostat Utility


4.6. iostat Utility

The iostat utility is the official place to get information about disk I/O performance, and it is a classic kstat(3kstat) consumer along with vmstat and mpstat. iostat can be run in a variety of ways.

In the following style, iostat provides single-line summaries for active devices.

$ iostat -xnz 5                     extended device statistics     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  device     0.2    0.2    1.1    1.4  0.0  0.0    6.6    6.9   0   0  c0t0d0     0.0    0.0    0.0    0.0  0.0  0.0    0.0    7.7   0   0  c0t2d0     0.0    0.0    0.0    0.0  0.0  0.0    0.0    3.0   0   0  mars:vold(pid512)                     extended device statistics     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  device   277.1    0.0 2216.4    0.0  0.0  0.6    0.0    2.1   0  58  c0t0d0                     extended device statistics     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  device    79.8    0.0  910.0    0.0  0.4  1.9    5.1   23.6  41  98  c0t0d0                     extended device statistics     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  device    87.0    0.0  738.5    0.0  0.8  2.0    9.4   22.4  65  99  c0t0d0                     extended device statistics     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  device    92.2    0.6  780.4    2.2  2.1  1.9   22.8   21.0  87  98  c0t0d0                     extended device statistics     r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b  device   101.4    0.0  826.6    0.0  0.8  1.9    8.0   19.0  46  99  c0t0d0 ... 


The first output is the summary since boot, followed by samples every five seconds. Some columns have been highlighted in this example. On the right is %b; this is percent busy and tells us disk utilization, [1] which we explain in the next section. In the middle is wait, the average wait queue length; it is a measure of disk saturation. On the left are kr/s and kw/s, kilobytes read and written per second, which tells us the current disk throughput.

[1] iostat -D prints the same statistic and calls it "util" or "percentage disk utilization."

In the iostat example, the first five-second sample shows a percent busy of 58%fairly moderate utilization. For the following samples, we can see the average wait queue length climb to a value of 2.1, indicating that this disk was becoming saturated with requests.

The throughput in the example began at over 2 Mbytes/sec and fell to less than 1 Mbytes/sec. Throughput can indicate disk activity.

iostat provides other statistics that we discuss later. These utilization, saturation, and throughput metrics are a useful starting point for understanding disk behavior.




Solaris Performance and Tools(c) Dtrace and Mdb Techniques for Solaris 10 and Opensolaris
Solaris Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris
ISBN: 0131568191
EAN: 2147483647
Year: 2007
Pages: 180

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net