Hi, can anyone please suggest a tool to dump i/o packets just like tcpdump does for network traffic. Basically I have a complex dataflow that needs to be optimized and I want to see how packets go to/from disk - what goes randomly and sequentially.
Yogesh, thanks for your reply. Afaik iostat and the like (sar, vmstat, ...) only report statistics, but do not dump i/o packets (pls let me know if i'm wrong). Of course you can do something like (number-of-io-bytes)/(number-of-io-request) and get a geenral idea of io ratio. However this kind of analysis cannot answer the questions like - am i accessing a file in the most efficient manner, or do I have unnecessary random seeks, etc...
I'm not sure how useful this information would be without direct I/O. Reordering, read-ahead, commit intervals, and plentiful cache can permit a variety of poor I/O practices to run almost optimally, not to mention make correlating I/O with software a headache -- it becomes so random it's used as seed for the system's "secure" RNG.
well, w/o seeing data access paths it's hard to say whether data access patterns are optimal or close to optimal and make any decisions regarding direct i/o. next, lets assume i decided to implement direct i/o - how do i tell whether my implementation is the optimal one. my case not about comparison or achieving certain kbps, it rather about getting best from disk.
Corona688, thanks for your input. But I think you agree with me that that's not exaclty it. With strace I cannot see how exactly read/write API calls are mapped into block devide requests, next - a very important one - I cannot see how efficiently I utilize FS. For example on some filesystems I have to allocate file in large chunks and then fseek, on others I have to append, so on... - all these choises become obvious once I can see what's going on under the hood...
PS
I think once I found a tool that did exactly what I need by installing a driver under /proc but now I can't find it anymore...
definitely not dtrace as this was linux i never heard of systap before, can you provide a link please because google is useless... but i think i found something: