top iowait

http://bbs.chinaunix.net/archiver/?tid-296344.html

一直都是用的top,刚才看了一下iostat里面的wait项,应该和top里面的iowait项是一样的。
这个标识的是IO事件的平均等待队列长度,基于等同于磁盘饱和度。越高说明磁盘已经来不及处理过多的IO请求。

 

http://blog.csdn.net/Lansehada/archive/2011/04/28/6370358.aspx

IOWait is a *software* state, indicating that a process or 
thread is blocked waiting for I/O to 
complete. 
This is different from "CPU time waiting for ..." in that it implies the 
software is making no 
progress, but *NOT* that your CPU is spending 
cycles working on it.[1] 


http://www.itlearner.com/article/4548

定位IOWait高的一些方法和工具

http://www.cublog.cn/u1/43502/showart_2495645.html

linux下查找最耗iowait的进程

http://groups.google.com/group/linuxbupt/browse_thread/thread/ec5bd94429035083

iowait的时候task是在sleep中,不占用CPU的,所以可以用来运行其他进程。
kernel会先把task state改成uninterruptible,就是ps看到的D状态。然后调用io_schedule()或者io_schedule_timeout(),­实际是调用到schedule()让进程sleep,并最终在enqueue_sleeper()中把sleep的这段时间计算到进程的iowait时间里。进­程sleep是通过把进程从runqueue中摘下来实现的,这样scheduler就不会调度sleep的进程。可见进程iowait的时候是不占用CPU的­。
这样的话top命令输出里统计有点问题,以后再研究一下top命令的统计方式。

下面是嵌入式平台使用busybox top命令的一个结果

CPU:  0.0% usr 24.7% sys  0.0% nic  0.0% idle 53.9% io  0.0% irq 21.2% sirq
Load average: 1.95 0.73 0.43 1/16 52
  PID  PPID USER     STAT   VSZ %MEM CPU %CPU COMMAND
   51    18 0        D    41048 44.2   0 27.4 ./iozone -a -i 1 -i 0 -s 100m -f /
   52    18 0        R     2456  2.6   0  4.4 busybox top
   25     2 0        DW<      0  0.0   0  1.6 [mmcqd]
   10     2 0        DW<      0  0.0   0  1.1 [kswapd0]
   18     1 0        S     2456  2.6   0  0.0 -/bin/sh
    1     0 0        S     2392  2.5   0  0.0 init 
    9     2 0        SW       0  0.0   0  0.0 [pdflush]
   22     2 0        SW<      0  0.0   0  0.0 [kmmcd]
    6     2 0        SW<      0  0.0   0  0.0 [kblockd/0]
    2     0 0        SW<      0  0.0   0  0.0 [kthreadd]
    3     2 0        SW<      0  0.0   0  0.0 [ksoftirqd/0]
    4     2 0        SW<      0  0.0   0  0.0 [events/0]
    5     2 0        SW<      0  0.0   0  0.0 [khelper]
    7     2 0        SW<      0  0.0   0  0.0 [kseriod]
    8     2 0        SW       0  0.0   0  0.0 [pdflush]
   11     2 0        SW<      0  0.0   0  0.0 [aio/0]

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值