[Linux-cachefs] Files read from NFS instead of fscache when also in pagecache

Ole Salscheider ole at salscheider.org
Wed Aug 2 07:28:47 UTC 2023


Hello,

I noticed some strange behaviour of fscache with kernel 6.4.x in 
combination with NFS (v4.2) and the pagecache.

I have multiple clients mounting an NFS v4.2 file system from a server 
and caching the data locally using fscache. After booting the clients, 
most data is served from fscache and only a few requests hit the NFS 
server. But after some minutes of operation (which typically includes a 
lot of cyclic data reading for us), fewer and fewer files are served 
from fscache and most are served by the NFS server.
It seems that this has something to do with the files being also in the 
pagecache. If I periodcally drop the pagecache with "echo 3 > 
/proc/sys/vm/drop_caches", then most of the files are served from 
fscache again.

Is this a known problem? If not, do you have any suggestion how I can 
try to find the root cause?

Thank you in advance!

Best regards,

Ole



More information about the Linux-cachefs mailing list