Capturing IO usage/patterns on a storage device under Linux OS

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,916
Location
USA
Does anyone know of any software tools that can record the general IO patterns of an application as it accesses the filesystem? I'm looking for a decent way to profile a custom piece of software and I'm looking for a decent way to capture this. I don't know if I'm asking the right question for this, but I'm looking for the quantity of IO access, the payload size, and the type (read vs write). I would then setup this piece of custom software to run through and perform its functions and then have a report of the IO activity at the end of the test. The OS is Linux/Suse in case that matters. Has anyone seen or used something that does this type of profiling work?
 

Handruin

Administrator
Joined
Jan 13, 2002
Messages
13,916
Location
USA
Thanks Chewy. I'm not familiar with either of those tools. I've been reading up on them with the links you posted. So far I haven't read anything related to the disk IO profiling that I was thinking of. I'm reading the material and it looks like CPU profiling. Maybe it's one of the same, but I was looking for an example of an application that may be reading and writing data to a database and how the data is either fetched or written and what are the sizes of the data read & writes.
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
sar, iostat, dstat, and htop are invaluable linux IO monitoring tools. "iosat -x 1" will give you a running display of the activity you requested on a block device level, iostat -x by itself will give you stats since boot (useful for before/after comparison). htop should be able to give you some basic per process stats on IO and IO bytes, I believe.

In the past Linux kept stats on a block device level, as of the last few years most kernels also include per process IO stats that include the number of reads/writes and kb read/written per process. Since RHEL 5 includes this ability (typically fairly slow to integrate new features), I'm going to guess Suse does as well.
 
Top