I/O Performance Messung (iostat)

Aus Qloc Wiki
Wechseln zu: Navigation, Suche

Allgemeines

Der zum sysstat gehörige Befehl "iostat" liefert Input/Output Statistiken von Massenspeichern, Partitionen sowie der CPU Last.
iostat ermöglicht die Geschwindigkeit des Storage zu überwachen. So lassen sich beispielsweise Leistungseinbußen (Lags & lange Ladezeiten) durch hohen IOwait feststellen.

Installation

  • Unter Debian / Ubuntu:
apt-get install sysstat
  • Unter CentOS:
yum install sysstat

Anwendung

Beispielausgabe: iostat -x

root@server~ $ iostat -x
Linux 3.16.0-4-amd64 (server.qloc.de)      23.10.2016      _x86_64_        (40 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          26,36    0,00    6,29    0,22    0,00   67,12

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,10    85,57   31,18  615,85  2428,85  7423,82    30,46     0,09    0,13    4,73    0,24   0,21  13,86

Bedeutung der Ausgabe

(Quelle: $ man iostat)

avg-cpu (CPU Utilization Report)

  • %user: Show the percentage of CPU utilization that occurred while executing at the user level (application).
  • %nice: Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.
  • %system: Show the percentage of CPU utilization that occurred while executing at the system level (kernel).
  • %iowait: Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
  • %steal: Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.
  • %idle: Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

Devices (Device Utilization Report)

  • Device: This column gives the device (or partition) name as listed in the /dev directory.
  • tps: Indicate the number of transfers per second that were issued to the device. A transfer is an I/O request to the device. Multiple logical requests can be combined into a single I/O request to the device. A transfer is of indeterminate size.
  • Blk_read/s (kB_read/s, MB_read/s): Indicate the amount of data read from the device expressed in a number of blocks (kilobytes, megabytes) per second. Blocks are equivalent to sectors and therefore have a size of 512 bytes.
  • Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s): Indicate the amount of data written to the device expressed in a number of blocks (kilobytes, megabytes) per second.
  • Blk_read (kB_read, MB_read): The total number of blocks (kilobytes, megabytes) read.
  • Blk_wrtn (kB_wrtn, MB_wrtn): The total number of blocks (kilobytes, megabytes) written.
  • rrqm/s: The number of read requests merged per second that were queued to the device.
  • wrqm/s: The number of write requests merged per second that were queued to the device.
  • r/s: The number (after merges) of read requests completed per second for the device.
  • w/s: The number (after merges) of write requests completed per second for the device.
  • rsec/s (rkB/s, rMB/s): The number of sectors (kilobytes, megabytes) read from the device per second.
  • wsec/s (wkB/s, wMB/s): The number of sectors (kilobytes, megabytes) written to the device per second.
  • avgrq-sz: The average size (in sectors) of the requests that were issued to the device.
  • avgqu-sz: The average queue length of the requests that were issued to the device.
  • await: The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
  • r_await: The average time (in milliseconds) for read requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
  • w_await: The average time (in milliseconds) for write requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
  • svctm: The average service time (in milliseconds) for I/O requests that were issued to the device. Warning! Do not trust this field any more. This field will be removed in a future sysstat version.
  • %util: Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100% for devices serving requests serially. But for devices serving requests in parallel, such as RAID arrays and modern SSDs, this number does not reflect their performance limits.