Ang*_*gus 4 linux performance ext3
这是blktrace的输出.我无法理解什么是"N 0(00 ..)[multipathd]".我正在测试FS的写IO性能.
我怀疑2,
blktrace o/p:
8,128 7 11 85.638053443 4009 I N 0 (00 ..) [multipathd]
8,128 7 12 85.638054275 4009 D N 0 (00 ..) [multipathd]
8,128 2 88 89.861199377 5210 A W 384 + 8 <- (253,0) 384
8,128 2 89 89.861199876 5210 Q W 384 + 8 [i_worker_0]
8,128 2 90 89.861202645 5210 G W 384 + 8 [i_worker_0]
8,128 2 91 89.861204604 5210 P N [i_worker_0]
8,128 2 92 89.861205587 5210 I WA 384 + 8 [i_worker_0]
8,128 2 93 89.861210869 5210 D WA 384 + 8 [i_worker_0]
8,128 2 94 89.861499857 0 C WA 384 + 8 [0]
8,128 2 95 99.845910681 5230 A W 384 + 8 <- (253,0) 384
8,128 2 96 99.845911148 5230 Q W 384 + 8 [i_worker_20]
8,128 2 97 99.845913846 5230 G W 384 + 8 [i_worker_20]
8,128 2 98 99.845915910 5230 P N [i_worker_20]
8,128 2 99 99.845917081 5230 I WA 384 + 8 [i_worker_20]
8,128 2 100 99.845922597 5230 D WA 384 + 8 [i_worker_20]
Run Code Online (Sandbox Code Playgroud)
IOSTAT和BLKTRACE之间的区别.
检查幻灯片5和6:
iostat实用程序确实提供了与特定设备相关的请求队列的信息
- - 队列上的平均I/O时间,合并次数,读/写块数,......
- - 但是,它不提供有关perI/O的详细信息
Blktrace.低开销,可配置的内核组件,它为在进入块I/O层的每个I/O上执行的特定操作发出事件
因此,iostat是输出统计数据的通用工具; 和blktrace是捕获和输出有关工具处于活动状态时所服务的所有I/O请求的更多信息的工具.
幻灯片11有一些解码介绍
8,128 7 11 85.638053443 4009 I N 0 (00 ..) [multipathd]
maj/min cpu seq# timestamp_s.ns pid ACT RWBS blocks process
Run Code Online (Sandbox Code Playgroud)
multipathd是内核守护进程,因为它的名称包含在[]大括号中.
blktrace.pdf中描述了默认格式(这里是pdf的来源:http://git.kernel.org/cgit/linux/kernel/git/axboe/blktrace.git/tree/doc/blktrace.tex)
"%D %2c %8s %5T.%9t %5p %2a %3d "
Run Code Online (Sandbox Code Playgroud)
%D将事件的设备主要/次要显示为:\%3d,\% - 3d.%2c CPU ID(2个字符的字段).%8s时间戳的秒部分的序列号%5T.%9t 5-charcter字段和时间戳中纳秒的9字符字段.进程ID的%5p 5个字符的字段.%2a其中一个操作的2个字符字段.RWBS数据的%3d 3字符字段.
操作
C -- complete
D -- issued
I -- inserted
Q -- queued
B -- bounced
M -- back merge
F -- front merge
G -- get request
S -- sleep
P -- plug
U -- unplug
T -- unplug due to timer
X -- split
A -- remap
m -- message
Run Code Online (Sandbox Code Playgroud)
RWBS
'R' - read,
'W' - write
'D' - block discard operation
'B' for barrier operation or
'S' for synchronous operation.
Run Code Online (Sandbox Code Playgroud)
所以,对于multipathd,我们有"I"动作="插入"而N为RWBS,而N则很奇怪.在doc中甚至在源代码中都没有N:blkparse_fmt.c - fill_rwbs().为什么?因为它是旧文件和旧源.
在现代内核中,例如,3.12在fill_rwbs中有N:http://sources.debian.net/src/linux/3.12.6-2/kernel/trace/blktrace.c? hl = 1038#L1038
if (t->action == BLK_TN_MESSAGE) {
rwbs[i++] = 'N';
goto out;
}
Run Code Online (Sandbox Code Playgroud)
并且blktrace_api.h将 BLK_TN_MESSAGE声明为
#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))
* Trace categories
BLK_TC_NOTIFY = 1 << 10, /* special message */
* Notify events.
__BLK_TN_MESSAGE, /* Character string message */
Run Code Online (Sandbox Code Playgroud)
因此,'N'是带字符串消息的通知操作.我认为可以看到消息而不是"块"字段.我能够找到添加了TN_MESSAGE的补丁,但没有更新文档(正如计划在bazaar -model中的linux一样)http://lkml.org/lkml/2009/3/27/31 "[ PATCH v2 6/7] blktrace:正确打印出BLK_TN_MESSAGE"2009
| 归档时间: |
|
| 查看次数: |
2347 次 |
| 最近记录: |