So, what value should we read to get the in out operations per second per process?
I've tried /proc/[pid]/io which returns these values:
root@node:~# cat /proc/31597/io
rchar: 213260190
wchar: 462308212
syscr: 23275044
syscw: 47797624
read_bytes: 894867968
write_bytes: 27645691392
cancelled_write_bytes: 0
From definition:
syscr, syscw - Counters for number of I/O operation (respectively: read and write). We may use then to compute average amount of data passed in one system call.
So, I think last value of syscw minus the previous value of syscw after a second should give me the write operation count that has been performed by process 31597
However, when the process is doing around 5MB/sec writes (small files), I get the value as 6500 IOPS for writing and that doesn't look correct to me.
Any ideas?