iostat -x 1 查看磁盘的IO负载
Posted cynchanpin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iostat -x 1 查看磁盘的IO负载相关的知识,希望对你有一定的参考价值。
avg-cpu: %user %nice %system %iowait %steal %idle
10.43 0.00 1.51 1.51 0.00 86.56
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 4477.00 9.00 951.00 13.00 24288.00 2492.00 55.56 0.21 0.22 0.21 0.92 0.17 16.00
%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.
%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.
即delta(wmerge)/s
即delta(rio)/s
await的大小一般取决于服务时间(svctm)以及I/O队列的长度和I/O请求的发出模式。假设svctm比較接近await,说明I/O差点儿没有等待时间;假设await远大于svctm,说明I/O队列太长。应用得到的响应时间变慢,假设响应时间超过了用户能够容许的范围,这时能够考虑更换更快的磁盘,调整内核elevator算法,优化应用,或者升级CPU
以上是关于iostat -x 1 查看磁盘的IO负载的主要内容,如果未能解决你的问题,请参考以下文章