Wolfgang, does it improve if you use nfs4? I think I read somewhere that nfs4 can cache read as well as write, whereas earlier versions can only cache reads. Mitch. ----- Original Message ----- From: "Wolfgang Denk" <wd@xxxxxxx> To: linux-cachefs@xxxxxxxxxx Sent: Saturday, October 17, 2009 1:41:11 PM GMT -08:00 US/Canada Pacific Subject: Fedora 11: fscache running but not caching ? Hello, I'm running some initial tests in a clean Fedora 11 envrionment (all updates, but no additional patches installed). I'm NFS mounting and trying to cache a remote directory connected through a relatively slow link - my hope is to see the accelerating effects of the cache especially well with such a setup. Everything seems to be working out of the box - but I see no actual caching taking place: the cache in /var/fscache remains completely empty, and I see no acceleration: reading the same set of files again and again takes the same amount of time with fscache running (see below), compared to a plain NFS mount (without "-o fsc") and without fscache running. Obviously I must be missing something. Here is the data I collected - maybe anybody can see what I'm doing wrong? # cat /etc/cachefilesd.conf ############################################################################### # # Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. # Written by David Howells (dhowells@xxxxxxxxxx) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version # 2 of the License, or (at your option) any later version. # ############################################################################### dir /var/fscache tag wd_gemini brun 10% bcull 7% bstop 3% frun 10% fcull 7% fstop 3% # mount -t nfs gemini:/home/wd/Mail /home/wd/Mail -o fsc # mount /dev/mapper/vg0-fedora10 on / type xfs (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda1 on /boot type ext3 (rw) /dev/mapper/vg0-root on /fedora7 type ext3 (rw) /dev/mapper/vg0-home_private on /home_private type ext3 (rw) /dev/mapper/vg1-backup on /backup type ext3 (rw) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) castor:/home on /home type nfs (rw,addr=10.0.0.10) nfsd on /proc/fs/nfsd type nfsd (rw) gemini:/home/wd/Mail on /home/wd/Mail type nfs (rw,fsc,addr=10.1.0.2) # cat /proc/fs/nfsfs/* NV SERVER PORT USE HOSTNAME v3 0a010002 0 1 gemini v3 0a00000a 0 1 castor NV SERVER PORT DEV FSID FSC v3 0a00000a 0 0:19 380c898c162893fb no v3 0a010002 0 0:20 cf0d1132eaeab9c4 yes # service cachefilesd start Starting cachefilesd: [ OK ] # df -h /var/fscache/ Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg0-f11 117G 14G 104G 12% / # ls /proc/sys/fs/nfs/ idmap_cache_timeout nfs_congestion_kb nlm_grace_period nlm_timeout nsm_local_state nfs_callback_tcpport nfs_mountpoint_timeout nlm_tcpport nlm_udpport nsm_use_hostnames # ls /proc/fs/fscache stats # cat /proc/fs/fscache/stats FS-Cache statistics Cookies: idx=18 dat=905 spc=0 Objects: alc=0 nal=0 avl=0 ded=2 ChkAux : non=0 ok=0 upd=0 obs=0 Pages : mrk=0 unc=0 Acquire: n=923 nul=0 noc=0 ok=923 nbf=0 oom=0 Lookups: n=0 neg=0 pos=0 crt=0 Updates: n=0 nul=0 run=0 Relinqs: n=638 nul=0 wcr=0 AttrChg: n=0 ok=0 nbf=0 oom=0 run=0 Allocs : n=0 ok=0 wt=0 nbf=0 Allocs : ops=0 owt=0 Retrvls: n=913 ok=0 wt=0 nod=0 nbf=913 int=0 oom=0 Retrvls: ops=0 owt=0 Stores : n=0 ok=0 agn=0 nbf=0 oom=0 Stores : ops=0 run=0 Ops : pend=0 run=0 enq=0 Ops : dfr=0 rel=0 gc=0 # ls -laR /var/fscache/ /var/fscache/: total 4 drwxr-xr-x 4 root root 34 Oct 16 23:37 . drwxr-xr-x. 24 root root 4096 Oct 16 23:29 .. drwx------ 2 root root 6 Oct 16 23:37 cache drwx------ 2 root root 6 Oct 16 23:37 graveyard /var/fscache/cache: total 0 drwx------ 2 root root 6 Oct 16 23:37 . drwxr-xr-x 4 root root 34 Oct 16 23:37 .. /var/fscache/graveyard: total 0 drwx------ 2 root root 6 Oct 16 23:37 . drwxr-xr-x 4 root root 34 Oct 16 23:37 .. # cat /proc/fs/fscache/stats FS-Cache statistics Cookies: idx=20 dat=1574 spc=0 Objects: alc=478 nal=0 avl=478 ded=2 ChkAux : non=0 ok=0 upd=0 obs=0 Pages : mrk=4033 unc=0 Acquire: n=1594 nul=0 noc=0 ok=1594 nbf=0 oom=0 Lookups: n=478 neg=478 pos=0 crt=478 Updates: n=0 nul=0 run=0 Relinqs: n=1115 nul=0 wcr=0 AttrChg: n=0 ok=0 nbf=0 oom=0 run=0 Allocs : n=0 ok=0 wt=0 nbf=0 Allocs : ops=0 owt=0 Retrvls: n=1583 ok=0 wt=474 nod=476 nbf=1107 int=0 oom=0 Retrvls: ops=476 owt=47 Stores : n=4033 ok=4033 agn=0 nbf=0 oom=0 Stores : ops=492 run=4525 Ops : pend=47 run=921 enq=4525 Ops : dfr=0 rel=968 gc=0 related syslog messages: Oct 17 22:23:26 nyx cachefilesd[11412]: About to bind cache Oct 17 22:23:26 nyx kernel: FS-Cache: Cache "wd_gemini" added (type cachefiles) Oct 17 22:23:26 nyx kernel: CacheFiles: File cache on dm-2 registered Oct 17 22:23:26 nyx cachefilesd[11412]: Bound cache Oct 17 22:23:26 nyx cachefilesd[11414]: Daemon Started Oct 17 22:23:26 nyx cachefilesd[11414]: Scan complete Oct 17 22:23:56 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:23:56 nyx cachefilesd[11414]: Scan complete Oct 17 22:24:26 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:24:26 nyx cachefilesd[11414]: Scan complete Oct 17 22:24:56 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:24:56 nyx cachefilesd[11414]: Scan complete Oct 17 22:25:27 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:25:27 nyx cachefilesd[11414]: Scan complete Oct 17 22:25:57 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:25:57 nyx cachefilesd[11414]: Scan complete Oct 17 22:26:27 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:26:27 nyx cachefilesd[11414]: Scan complete Oct 17 22:26:57 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:26:57 nyx cachefilesd[11414]: Scan complete Oct 17 22:27:27 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:27:27 nyx cachefilesd[11414]: Scan complete Oct 17 22:27:57 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:27:57 nyx cachefilesd[11414]: Scan complete Oct 17 22:28:27 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:28:27 nyx cachefilesd[11414]: Scan complete Oct 17 22:28:57 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:28:57 nyx cachefilesd[11414]: Scan complete Oct 17 22:29:27 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:29:27 nyx cachefilesd[11414]: Scan complete Oct 17 22:29:57 nyx cachefilesd[11414]: Refilling cull table Oct 17 22:29:57 nyx cachefilesd[11414]: Scan complete Oct 17 22:30:05 nyx cachefilesd[11414]: Daemon Terminated Oct 17 22:30:05 nyx kernel: CacheFiles: File cache on dm-2 unregistering Oct 17 22:30:05 nyx kernel: FS-Cache: Withdrawing cache "wd_gemini" All feedback wellcome. Thanks in advance. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@xxxxxxx Of course there's no reason for it, it's just our policy. -- Linux-cachefs mailing list Linux-cachefs@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cachefs CONFIDENTIAL This document and attachments contain information from Fusion-io, Inc. which is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named on this transmission. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this emailed information is strictly prohibited, and that the documents should be returned to Fusion-io, Inc. immediately. In this regard, if you have received this email in error, please notify us by return email immediately. -- Linux-cachefs mailing list Linux-cachefs@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cachefs