iogrind is a prototype I/O profiling tool, under development. It aims to give a fairly accurate picture of all the I/O your application would perform on a cold start: this can help to accelerate your application's cold start performance. It also has a nice file-system view. For all development related questions, contact the iogrind mailing list at email@example.com.
iogrind works in 3 parts:
- tracing the application using valgrind
- snapshotting the filesystem
- simulating the trace, against a snapshot to visualise.
To avoid people getting too excited about using iogrind for prime time usage, here are a few of it's shocking deficiencies:
- the disk simulation is highly inaccurate
we do no write simulation at all (requires file-system layout & per-file-system heuristics etc.)
- we have little to no threading support - single threaded apps only please, nor can we follow forks effectively
- stack traces sometimes get jumbled for no obvious reason (pwrt. threads).
On the other hand, some of these are not that difficult to fix, patches much appreciated.
This currently requires some custom hooks to valgrind; get the modified valgrind from:
valgrind --tool=iogrind --log-file-exactly=/tmp/your-app.prf your-application
Unless you just wish to play with a file-system view, it is necessary to use an ext3 file-system. It is (usually) not necessary to unmount the partition before dumping the details. Do:
ext2dump /dev/sda1 > sda1.xml
If you wish to dump some sub-path of a filing-system, just to examine a single directory, simply append the paths you are interested in to ext2dump.
To visualise run iogrind at the console:
iogrind --fsmodel=sda1.xml /tmp/your-app.prf
iogrind has various visualisation modes:
It is possible to draw a histogram - area is simulated time, with stack frames in the left hand tree view.
It is possible to see compressed address space (vertical) vs. simulated time: each black dot is the 1st touch of that page (expanded to 1x1 pixel)
This shows the file-system trace, and can be used as a standalone tool: 'fsview'
This shows the I/O pattern by connecting each I/O event to the next with red-lines, this creates a string of events, that (ideally) should be a single horizontal line, however due to scattering of the data, this often yields a scribble effect.
Getting the code
The latest released source archive should be at ftp://ftp.gnome.org/pub/gnome/sources/iogrind/ And for the latest code use: