Re: [BUG] fscache writing but not reading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 23, 2023 at 7:18 AM Chris Chilvers <chilversc@xxxxxxxxx> wrote:
>
> On Fri, 19 May 2023 at 10:40, David Howells <dhowells@xxxxxxxxxx> wrote:
> >
> > Chris Chilvers <chilversc@xxxxxxxxx> wrote:
> >
> > > While testing the fscache performance fixes [1] that were merged into 6.4-rc1
> > > it appears that the caching no longer works. The client will write to the cache
> > > but never reads.
> >
> > Can you try reading from afs?  You would need to enable CONFIG_AFS_FS in your
> > kernel if it's not already set.
> >
> > Install kafs-client and do:
> >
> >         systemctl enable afs.mount
> >         md5sum /afs/openafs.org/software/openafs/1.9.1/openafs-1.9.1-doc.tar.bz2
> >         cat /proc/fs/fscache/stats
>
> FS-Cache statistics
> Cookies: n=13 v=7 vcol=0 voom=0
> Acquire: n=13 ok=13 oom=0
> LRU    : n=1 exp=0 rmv=0 drp=0 at=2833
> Invals : n=0
> Updates: n=0 rsz=0 rsn=0
> Relinqs: n=0 rtr=0 drop=0
> NoSpace: nwr=0 ncr=0 cull=0
> IO     : rd=0 wr=18
> RdHelp : RA=18 RP=0 WB=0 WBZ=0 rr=0 sr=0
> RdHelp : ZR=1 sh=0 sk=0
> RdHelp : DL=18 ds=18 df=0 di=0
> RdHelp : RD=0 rs=0 rf=0
> RdHelp : WR=18 ws=18 wf=0
>
> This was on an instance that was only just created, so the cache was
> initially unused (all the counters were 0).
>
> >         umount /afs/openafs.org
> >         md5sum /afs/openafs.org/software/openafs/1.9.1/openafs-1.9.1-doc.tar.bz2
> >         cat /proc/fs/fscache/stats
>
> FS-Cache statistics
> Cookies: n=13 v=7 vcol=0 voom=0
> Acquire: n=26 ok=26 oom=0
> LRU    : n=1 exp=1 rmv=0 drp=0 at=467
> Invals : n=0
> Updates: n=0 rsz=0 rsn=0
> Relinqs: n=13 rtr=0 drop=13
> NoSpace: nwr=0 ncr=0 cull=0
> IO     : rd=18 wr=18
> RdHelp : RA=36 RP=0 WB=0 WBZ=0 rr=0 sr=0
> RdHelp : ZR=1 sh=0 sk=0
> RdHelp : DL=18 ds=18 df=0 di=0
> RdHelp : RD=18 rs=18 rf=0
> RdHelp : WR=18 ws=18 wf=0
>
> Looks like the cache is working fine with AFS. The second md5sum
> seemed a lot quicker than the first.
>
> --
> Linux-cachefs mailing list
> Linux-cachefs@xxxxxxxxxx
> https://listman.redhat.com/mailman/listinfo/linux-cachefs
>

I don't think this test demonstrates the failure Chris is seeing, or
correct me if I'm wrong Chris.

Chris, does this same test fail for you with NFS on 6.4-rc1?  The same
test passes for me with NFSv3.
1st time through: writes to the cache seen, no reads: IO     : rd=0 wr=16
2nd time through: reads from the cache seen, no writes: IO     : rd=16 wr=16


# mount -o vers=3,fsc 127.0.0.1:/export/ /mnt/nfs
# cat /proc/fs/fscache/stats
FS-Cache statistics
Cookies: n=0 v=1 vcol=0 voom=0
Acquire: n=0 ok=0 oom=0
LRU    : n=0 exp=0 rmv=0 drp=0 at=0
Invals : n=0
Updates: n=0 rsz=0 rsn=0
Relinqs: n=0 rtr=0 drop=0
NoSpace: nwr=0 ncr=0 cull=0
IO     : rd=0 wr=0
RdHelp : RA=0 RP=0 WB=0 WBZ=0 rr=0 sr=0
RdHelp : ZR=0 sh=0 sk=0
RdHelp : DL=0 ds=0 df=0 di=0
RdHelp : RD=0 rs=0 rf=0
RdHelp : WR=0 ws=0 wf=0
# md5sum /mnt/nfs/openafs-1.9.1-doc.tar.bz2
ca25530ec01afc3b71bc081bc93b87cf  /mnt/nfs/openafs-1.9.1-doc.tar.bz2
# cat /proc/fs/fscache/stats
FS-Cache statistics
Cookies: n=1 v=1 vcol=0 voom=0
Acquire: n=1 ok=1 oom=0
LRU    : n=1 exp=0 rmv=0 drp=0 at=6444
Invals : n=0
Updates: n=1 rsz=0 rsn=0
Relinqs: n=0 rtr=0 drop=0
NoSpace: nwr=0 ncr=0 cull=0
IO     : rd=0 wr=16
RdHelp : RA=16 RP=0 WB=0 WBZ=0 rr=0 sr=0
RdHelp : ZR=1 sh=0 sk=0
RdHelp : DL=16 ds=16 df=0 di=0
RdHelp : RD=0 rs=0 rf=0
RdHelp : WR=16 ws=16 wf=0
# umount /mnt/nfs
# mount -o vers=3,fsc 127.0.0.1:/export/ /mnt/nfs
# md5sum /mnt/nfs/openafs-1.9.1-doc.tar.bz2
ca25530ec01afc3b71bc081bc93b87cf  /mnt/nfs/openafs-1.9.1-doc.tar.bz2
# cat /proc/fs/fscache/stats
FS-Cache statistics
Cookies: n=1 v=1 vcol=0 voom=0
Acquire: n=2 ok=2 oom=0
LRU    : n=1 exp=1 rmv=0 drp=0 at=6710
Invals : n=0
Updates: n=2 rsz=0 rsn=0
Relinqs: n=1 rtr=0 drop=1
NoSpace: nwr=0 ncr=0 cull=0
IO     : rd=16 wr=16
RdHelp : RA=32 RP=0 WB=0 WBZ=0 rr=0 sr=0
RdHelp : ZR=1 sh=0 sk=0
RdHelp : DL=16 ds=16 df=0 di=0
RdHelp : RD=16 rs=16 rf=0
RdHelp : WR=16 ws=16 wf=0
# uname -r
6.4.0-rc1

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux