Gilad
One more input, which is important (imho) - this is a performance measurement / system tuning objective, not a system accounting application - i.e.we are not trying to charge someone for io usage ( i think they used to do that once upon a time....). 10x
dL



Gilad Ben-Yossef wrote:
Danny Lieberman wrote:

I have a simply question, namely "How many disk block reads and writes is a process doing over a given period of time, and what is the minimum, maximum and average stats"

This seemingly trivial question (which can easily be answered in a Windows operating system using the system performance monitor) appears to be a gray area at best.

I know there is work on io-accounting in the new versions of the kernel -- but a) I dont have the luxury of updating the kernel and b) these are stats I would expect to see in user space
like vmstat or top in any version of the kernel.

Still waiting for an answer.

I am sure one of the people on the list will know the answer.

The reason there is no good answer to your question is because it seems on it's face to be very well defined, but it really isn't. I'll try to explain why:

In Linux processes do not talk to block devices directly (unless using direct IO calls, which is rare). Processes make system calls that call on the file system drivers that call on the buffer cache which in turn uses the block device drivers to write/read from actual disk hardware.

The problem is, that all this does not happen in a synchronious manner - the process can make a write system call that will put data in the buffer cache and the kernel will decide to flush those buffer to disk 3.5 seconds later (perhaps even after the proccess has ended!), along with half a dozen other buffers from other processes. Do you charge the proccess for this IO activity and how?

In a similar manner: it is possible that a write will go to cache, a second write (from same or different proccess) will update the buffer in the cace and only the end buffer will be written to disk. When the buffer will written to disk at the end - who do you charge for the IO - the first proccess, the second proccess, both?

Since the correct answer to these and similar question is completly situation dependendant, a general tool that does what you want does not exist. If you will describe in detail your need we can advise on a good way to acheive it.

Hope this helps,
Gilad




--
Danny Lieberman


Call us today!
--------------------------------------------------------------------------------------------
www.software.co.il - Deliver secure software to your customers
www.opensolutions.co.il - Reduce operational risk of information security
www.extrusiondetection.net - Stop data theft
www.software.co.il/pta     - Download a free copy of the PTA-Practical threat 
analysis tool
--------------------------------------------------------------------------------------------
Tel Aviv   + 972  3 610-9750
Bethesda   + 1-301-841-7122
Cell       + 972 54 447-1114


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to