Details
-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
Currently Lustre has no way to distinguish cached read (page cache hit) bytes from total read bytes. Both fast reads and slow reads are tallied into the same read_bytes counter.
Adding a separate cached_read_bytes stat with BYTES_FULL type allows users to see what fraction of their read I/O is being served from the page cache vs going through the full cl_io/DLM path. This enables computing a cache hit ratio (cached_read_bytes / read_bytes) which is valuable for performance analysis and tuning.
Implementation: add LPROC_LL_CACHED_READ to the llite stats enum, register it in the opcode table as cached_read_bytes with LPROCFS_TYPE_BYTES_FULL, and tally it in ll_do_fast_read() when the fast read succeeds.