In vmstat output, what does blocked process mean ( b = 1 ) ?

本文解析了在Red Hat Enterprise Linux中使用vmstat命令时,即使没有运行进程(r=0),仍然显示有阻塞进程(b=1)的情况。深入解释了阻塞状态的含义,即进程处于等待I/O完成的不可中断睡眠状态,这是系统设计中的正常行为。

https://access.redhat.com/solutions/792683

 SOLUTION UNVERIFIED - 已更新 2014年八月11日10:28 - 

English 

环境

  • Red Hat Enterprise Linux

问题

  • In vmstat output analysis - In the "b" column, there is often a blocked process when there is no runnable process (b=1, r=0):

Raw

  procs ---------memory---------- ..--io-- --system-- -----cpu------
  r b swpd   free   buff     cache.. bi   bo   in   cs us sy id wa st
  4 0  584 353356 253400 113705408..  2    7    1    1  1  0 99  0  0
  0 0  584 370396 253488 113686320..213 1768 1479 9980  2  1 97  0  0
  1 1  584 372116 253548 113686464..  0  102 1363 5944  1  0 99  0  0
  1 0  584 363424 253592 113694160..  0  902 1419 10058 2  1 97  0  0
  1 1  584 363084 253652 113694248..  0  916 1629 7889  3  0 97  0  0
  0 1  584 354056 253724 113701984.. 18  877 1551 9900  3  1 96  0  0
  0 1  584 352184 253792 113702256.. 26 1126 1494 6634  1  0 98  0  0
  3 0  584 370772 253852 113682080..  0  826 1419 9887  2  1 97  0  0
  0 1  584 371656 253920 113682160..  0 1032 1471 6691  1  0 99  0  0
  1 0  584 363232 253964 113689544..  0  822 1403 8909  1  1 97  0  0
  0 1  584 363684 254012 113689904..  0  954 1384 6119  1  0 99  0  0
  1 0  584 353920 254060 113697632..  0  846 1394 9668  2  2 96  0  0
  0 1  584 354168 254120 113697712..  0  927 1449 5809  1  0 99  0  0
  1 0  584 373448 254168 113677552..  0  829 1493 9389  2  1 97  0  0
  0 1  584 373964 254240 113677632..  0  970 1414 5998  1  0 98  0  0;
  2 0  584 363684 254304 113685360..  6 1651 1439 8446  2  1 96  1  0
  0 1  584 364836 254380 113685424..  0  182 1389 6240  2  1 97  0  0
  1 0  584 354992 254436 113692976..  0 1102 1308 9352  1  1 98  0  0
  0 1  584 355396 254500 113693168..  0  632 1400 4912  1  0 98  0  0
  1 0  584 346056 254564 113700600..  0  862 1426 9563  2  1 97  0  0
  0 1  584 374380 254636 113673032..  0  929 1339 5116  1  0 99  0  0
  • If there are no running processes, then what is the blocked process blocked on?

决议

  • The blocked process ( b = 1 ) means the task is 'blocked' (or 'uninterruptible' or in 'deep sleep') when it is waiting for some event (mostly IO work to finish). So for example when task asks to read data from disk it will change it's state to "blocked" as it waits for receiving the data. The task cannot run on before it gets the data and if there is not any other task to run at that moment, running processes could be zero.

  • This is completely normal behavior intended by design.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值