Why is it so hard to perform per-process I/O accounting
- Even if we avoid having the "multiple-suspects" situation - delayed-writes:
- Process A wrote to a file - into page-cache.
- pdflush eventually flushed it to disk - so process A didn't do any I/O.
- We could mark the "data owner" in the page-cache - but this will break
when we have multiple suspects.
- Another case - partial-page reads:
- Process A wants to read 512 bytes.
- The file-system works at a block size of 4KB.
- Thus the file system reads 4KB from disk - and returns 512 bytes
to process A.
- How much do we account for process A - 512 bytes or 4096 bytes?
- What if process A wanted to read only 1 byte at offset 173?
Originally written by
guy keren