[Linux-cachefs] fsc stats in /proc/self/mountstats

Nick Hall nick.hall at goodbyekansas.co.uk
Thu Apr 22 15:43:19 UTC 2021


Hello All,

Apologies if this is a basic question, but I'm trying to ascertain fs-cache
performance.

The howto.txt that comes with cachefs documents that data on pages written
and retrieved from the cache is exposed in /proc/sys/fs/nfs/

This is missing on my system (CentOS 7.9) but searching the web brought up
a SUSE KB article mentioning that the data has moved to
/proc/self/mountstats. And indeed here I see an fsc entry for each mounted
filesystem.

Some more web searching led me to a number of pages that detailed the
counters displayed as <rok> <rfl> <wok> <wfl> <unc>

"Where <rok> is the number of pages read successfully from the cache, <rfl>
is
the number of failed page reads against the cache, <wok> is the number of
successful page writes to the cache, <wfl> is the number of failed page
writes
to the cache, and <unc> is the number of NFS pages that have been
disconnected
from the cache."

However I notice the 'bytes' line in mountstats just above has exactly the
same values for its' counters Here are the respective lines from my system:

       bytes:  34808359984 16191849926 0 0 7750384932 16191871206 1892279
3953222
         fsc:    34808359984 16191849926 0 0 7750384932

I further read that the byte counters refer to:

" (linux/nfs_iostat.h: nfs_stat_bytecounters)

   1. normalreadbytes
   2. normalwritebytes
   3. directreadbytes
   4. directwritebytes
   5. serverreadbytes
   6. serverwritebytes (serverwrittenbytes)
   7. readpages
   8. writepages"

I'm confused as to why these values are the same. For example, is it likely
that the 5th value on each line of 77503841932 is correct for both "NFS
pages disconnected from the cache" and "server read bytes" ?

Thanks
Nick



More information about the Linux-cachefs mailing list