Visualizing BlockTrace example

The examples in this section require the python matplotlib module. This can be installed on RHEL5 systems by doing:

yum install python-matplotlib
Take the output from the blk_trace.stp sample and dump it into a file (or re-run the previous example, dumping stdout to a file). Then, run the utility on it:
python cat_io.log
This writes a plot out to trace.png. View this; our copy is below.
Here's an explanation of the graph
  • The black line segments are calls to read(); because I do nothing with the resulting data, you aren't going to see any whitespace between them.
  • The red line segments are I/O requests being queued and completed in the block layer. Notice the surprisingly high level of parallelism of I/O requests that the OS does for a single-threaded sequential read.
  • The blue line segments are I/O requests sent out to the device driver.
  • The dashed green lines are "partial stalls" - the read() call had to wait for I/O completion, but the OS at least requested the data prior to the start of the read(). So, it successfully predicted the need for the data, but was not able to get the request completed before the client wanted the data.
  • The solid green lines are "complete stalls" - the OS completely failed to predict the need for this data. You can see an block I/O request made after the read() starts, and the read() blocks until that request has been completed.
  • The magenta lines (none in this example picture) will show calls to posix_fadvise; this interface is used in ROOT/CMSSW.
Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng trace.png r1 manage 49.1 K 2010-03-16 - 17:19 BrianBockelman  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2010-05-13 - BrianBockelman
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback