Tru64 Unix
1752458 會員
6301 線上
108788 解決方案
發表新文章

wait io %是從哪裡分出來的

 
watermelonyu
教授

wait io %是從哪裡分出來的

#sar -u 可以看到cpu %有wait io的選項

%usr %sys %wio %idle



但是在

#vmstat卻只有

us sy id

兩者總和都是100

請問wait i/o是從system mode分出來的嗎
6則回覆 6
watermelonyu
教授

wait io %是從哪裡分出來的

Hello Joey:



一般process有Disk I/O需求時,應該會透過system

calls, (例如:read(...)或write(...)), 所以研判

wait io是將system mode更細部分析.



# man sar

... ... ...

%wio Percent of time processor-id is idle while a process waits for block I/O.



Best Regards

Danny

watermelonyu
教授

wait io %是從哪裡分出來的

Hello Joey:



#man sar

%wio Percent of time processor-id is idle while a process waits for block I/O.

%idle Percent of time processor-id is idle. This does not include the time reported by %wio.



因為每個process重開始執行到結束會歷經很多states,如果

所需處理的資料都已經在memory中, 此時應該是CPU處於

user-mode, 一旦有disk I/O需求,會進入system-mode

但週邊設備(如disk storages)可能正在忙無法立刻回應

I/O requests, 此時應該會有wait io狀況.一般wait io

不應維持太久, 否則就應檢查I/O是否過度集中在某些disks

上造成瓶頸.



Best Regards

Danny

watermelonyu
教授

wait io %是從哪裡分出來的

Hi all,



> #sar -u 可以看到cpu %有wait io的選項

> %usr %sys %wio %idle

>

> 但是在

> #vmstat卻只有

> us sy id



請用 "collect -i 5 -sc" command for trace the CPU detailed information within interval 5 seconds.

Or

# kdbx -k /vmunix

(kdbx) cpustat -update 5 ==> Update every 5 seconds.



Best regards,

Richard.

watermelonyu
教授

wait io %是從哪裡分出來的

Hi Richard

請問collect可否像vmstat一樣....設定執行的次數?
watermelonyu
教授

wait io %是從哪裡分出來的

Hello all,



> # vmstat卻只有

> us sy id

> 兩者總和都是100

> 請問wait i/o是從system mode分出來的嗎



# man vmstat

...

...

CPU information:



us Percentage of user time for normal and priority processes.



sy Percentage of system time.



id Percentage of idle time.



iowait

Percentage of iowait. If the -w option is not specified, the iowait

time is included in the id statistic.



The wait io% will shown on "idle" while running "vmstat" without "-w".



Best regards,

Richard.
watermelonyu
教授

wait io %是從哪裡分出來的

Hi David,



Please using online "man collect", you

will get the solution as "collect -R" as below:



-R Specify the duration of data collection. Either of the following for-



mats can be specified:



# collect -i 3 -R 10s

..

..

# bc

10/3

3

^D

#



It completes after 3 times collections.



Best regards,

Richard.