iowait 高排查步骤

按顺序排查:确认 iowait 与 steal 占比 → 找 IO 进程 → 看设备指标 → 评估内存回收干扰,避免直接归因存储。

工具链mpstat → iotop/pidstat -d → iostat -x → PSI io
误判点宿主 steal、回收导致的读放大

步骤命令

步骤命令
mpstat 1 3 | tail -2
sudo iotop -obn 1 | tail -20
pidstat -d 1 3 | tail -20
iostat -dx 1 3
cat /proc/pressure/io

易错点

  • 虚拟机上 iowait 可能来自宿主,结合平台监控与 steal 判读
  • iowait 只在 CPU 有空闲时累计,纯计算密集不会体现 IO 压力

数据来源与参考

  • sysstat 文档
  • Linux 内核 Documentation/accounting/psi.rst
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌