http://www.ibm.com/developerworks/cn/linux/l-cn-perf1/

http://blog.chinaunix.net/uid-24774106-id-4096470.html

http://blog.chinaunix.net/uid-7585066-id-2048703.html

[root@localhost /]# mount   -t  debugfs none  /sys/kernel/debug/

[root@localhost /]# blktrace -d /dev/sda -o - |blkparse -i - -o blkparse.out

[root@localhost /]cat blkparse.out

[root@localhost /]cat blkparse.out
, 0.000000000 A WS + <- (,)
, 0.000007285 Q WS + [syslogd]
, 0.000013375 G WS + [syslogd]
, 0.000015850 P N [syslogd]
, 0.000017365 I W + [syslogd]
, 0.000019440 m N cfq3408 insert_request
, 0.000020300 m N cfq3408 add_to_rr
, 0.000021995 m N cfq3408 preempt
, 0.000022605 m N cfq2980 slice expired t=
, 0.000023220 m N cfq2980 resid=-
, 0.000026665 m N cfq3408 set_active 。。。。。。。。
CPU0 (,):
Reads Queued: , 0KiB Writes Queued: , 56KiB
Read Dispatches: , 0KiB Write Dispatches: , 56KiB
Reads Requeued: Writes Requeued:
Reads Completed: , 0KiB Writes Completed: , 56KiB
Read Merges: , 0KiB Write Merges: , 40KiB
Read depth: Write depth:
IO unplugs: Timer unplugs:
CPU1 (,):
Reads Queued: , 0KiB Writes Queued: , 12KiB
Read Dispatches: , 0KiB Write Dispatches: , 12KiB
Reads Requeued: Writes Requeued:
Reads Completed: , 0KiB Writes Completed: , 12KiB
Read Merges: , 0KiB Write Merges: , 0KiB
Read depth: Write depth:
IO unplugs: Timer unplugs: Total (,):
Reads Queued: , 0KiB Writes Queued: , 68KiB
Read Dispatches: , 0KiB Write Dispatches: , 68KiB
Reads Requeued: Writes Requeued:
Reads Completed: , 0KiB Writes Completed: , 68KiB
Read Merges: , 0KiB Write Merges: , 40KiB
IO unplugs: Timer unplugs:

blkblock工具1-LMLPHP

A  IO was remapped to a different device   blk-core.c/trace_block_remap
B  IO bounced                              bounce.c/trace_block_bio_bounce
C  IO completion                           blk-core.c/trace_block_rq_complete
D  IO issued to driver                     elevator.c/trace_block_rq_issue
F  IO front merged with request on queue   blk-core.c/trace_block_bio_frontmerge
G  Get request                             blk-core.c/trace_block_getrq
I  IO inserted onto request queue          elevator.c/trace_block_rq_insert
M  IO back merged with request on queue    blk-core.c/trace_block_bio_backmerge
P  Plug request                            blk-core.c/trace_block_plug
Q  IO handled by request queue code        blk-core.c/trace_block_bio_queue
S  Sleep request                           blk-core.c/trace_block_sleeprq
T  Unplug due to timeout                   blk-core.c/trace_block_unplug_timer
U  Unplug request                          blk-core.c/trace_block_unplug_io
X  Split                                   bio.c/trace_block_split

R表示是read操作,W表示write操作,B是barrier operation,S是synchronous operation

blkblock工具1-LMLPHP

05-11 22:56