Blktrace, a block layer monitoring tool in Linux

Source: Internet
Author: User

Blktrace is a block layer I/O path monitoring and analysis tool. It can be used to gain an in-depth understanding of the I/O path, which is helpful for monitoring and performance tuning. 1. the architecture of blktrace is implemented in two parts: kernel space and user space. In kernel space, tracepoint is mainly added to the key points in the block layer I/O path, then, with the help of the relayfs system features, the collected data is written to the buffer and then collected from the user space. The user space also implements several gadgets, blkparse and BTT, to analyze the collected data. 2. the code for installing the kernel space has been integrated into the main line code. You can check the kernel code block/blktrace. check whether the c file exists. Select the corresponding trace option during compilation. Sudo apt-Get install blktrace on ubuntu9.04. After the installation is complete, several PDF documents are detailed in/usr/share/doc/blktrace. Take a closer look. 3. The implementation mainly refers to how the code in the kernel is implemented. 1) Most of the implementation code is in the blktrace file. Using the tracepoint feature, we have registered some trace key points. You can refer to the documentation/tracepoint.txt file. 2 ). the interaction mechanism utilizes the relayfs feature to see documentation/filesystems/relay.txt. 4. document 1 ). /usr/share/doc/blktrace/btt.pdf, blktrace.pdf is the user manual 2 ). http://www.gelato.org/pdf/apr2006/gelato_ICE06apr_blktrace_brunelle_hp.pdf to write a good introduction PDF. 3). http://elinux.org/Kernel_Trace_Systems 5. Some state mappings act description setposition
A Io was remapped to a different device blk-core.c/trace_block_remap
B io bounced bounce. c/trace_block_bio_bounce
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

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.