什麼是 iowait
IOWait in this context is the measure of time over a given period that a CPU (or all CPUS) spent idle
because all runnable tasks were waiting for a IO operation to be fulfilled.
當 High iowait 時
CLI Tools
# -m Display statistics in megabytes per second.
iostat -m 5
...
avg-cpu: %user %nice %system %iowait %steal %idle
5.19 0.00 10.68 63.28 0.00 20.85
Monitoring tool: Netdata
Log: Centos 7 - /var/log/message
... backup1 kernel: ata4.00: failed command: READ FPDMA QUEUED ... backup1 kernel: ata4.00: cmd 60/08:e0:10:11:be/00:00:52:00:00/40 tag 28 ncq 4096 in#012 res 50/00:08:a0:11:be/00:00:52:00:00/40 Emask 0x10 (ATA bus error) ... backup1 kernel: ata4.00: status: { DRDY } ... 一堆堆重復 Error ... ... backup1 kernel: ata4: hard resetting link ... backup1 kernel: ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300) ... backup1 kernel: ata4.00: configured for UDMA/133 ... backup1 kernel: sd 4:0:0:0: [sdd] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE ... backup1 kernel: sd 4:0:0:0: [sdd] Sense Key : Illegal Request [current] [descriptor] ... backup1 kernel: sd 4:0:0:0: [sdd] Add. Sense: Unaligned write command ... backup1 kernel: sd 4:0:0:0: [sdd] CDB: Read(16) 88 00 00 00 00 00 52 7d d9 10 00 00 00 08 00 00 ... backup1 kernel: blk_update_request: I/O error, dev sdd, sector 1383979280 ... backup1 kernel: sd 4:0:0:0: [sdd] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE ... backup1 kernel: sd 4:0:0:0: [sdd] Sense Key : Illegal Request [current] [descriptor] ... backup1 kernel: sd 4:0:0:0: [sdd] Add. Sense: Unaligned write command ... backup1 kernel: sd 4:0:0:0: [sdd] CDB: Read(16) 88 00 00 00 00 00 52 7d d9 20 00 00 00 08 00 00 ... backup1 kernel: blk_update_request: I/O error, dev sdd, sector 1383979296 ... backup1 kernel: ata4: EH complete