一、IO请求到写入设备各个阶段的时间统计 ==================== All Devices ==================== ALL MIN AVG MAX N
--------------- ------------- ------------- ------------- ----------- • Q2Q 0.000000808 0.000022550 0.169176199 5017599 • Q2G 0.000000606 0.002694758 0.169166444 39199 • S2G 0.070385850 0.086264639 0.169165248 1224 • G2I 0.000146627 0.001615914 0.006145786 39199 • Q2M 0.000000149 0.000000254 0.000217874 4978400 • I2D 0.227251891 0.313646256 0.464198624 39103 • M2D 0.230494332 0.315166061 0.464387299 4966208 • D2C 0.056031007 0.095095120 0.210527104 5001087 • Q2C 0.338179300 0.410294069 0.596850606 5001087 其中各个阶段说明: • Q2Q — time between requests sent to the block layer • Q2G — time from a block I/O is queued to the time it gets a request allocated for it • G2I — time from a request is allocated to the time it is Inserted into the device's queue • Q2M — time from a block I/O is queued to the time it gets merged with an existing request • I2D — time from a request is inserted into the device's queue to the time it is actually issued to the device • M2D — time from a block I/O is merged with an exiting request until the request is issued to the device • D2C — service time of the request by the device • Q2C — total time spent in the block layer for a request 问题:Q2I + I2D + D2C = Q2C,实际测出来的并不相等,资料中的结果也是
三、IO合并的比例,Q表示传入的IO请求数量,D表示合并后发出的请求数量,Ratio表示合并的比例,BLKxxx表示合并后的块的大小最大值、最小值和平均值 ==================== Device Merge Information ==================== DEV | #Q #D Ratio | BLKmin BLKavg BLKmax Total ---------- | -------- -------- ------- | -------- -------- -------- -------- ( 8, 32) | 5017600 39198 128.0 | 1024 1024 1024 40138752
四、IO调度相关,当一个IO 进入Q状态时,调度器中此时有多少IO处于D状态 ==================== Active Requests At Q Information ==================== DEV | Avg Reqs @ Q ---------- | ------------- ( 8, 32) | 14.9
五、每一个进程的时间段统计 ==================== Per Process ==================== Q2C MIN AVG MAX N --------------- ------------- ------------- ------------- ----------- kworker 0.339407380 0.414291058 0.595046589 1374335