[Linux-cachefs] FSCache not used / /var/fscache empty

Steve Dickson SteveD at redhat.com
Tue Feb 3 15:28:59 UTC 2009



Philipp Wehrheim wrote:
> Hey,
> 
> im trying to get fscache to work for a nfs share
> but for some reasons fscache is not active and the cache-dir
> is not beeing used.
> 
> This is what I did so far:
> 
> fetch the git tree, reset to fscache-commit version (44) and apply patches.
> 	Linux NFS-Cache 2.6.29-rc1-00534-g7cb36b6-dirty #1 SMP Mon Feb 2 14:42:32 CET 2009 i686 QEMU Virtual CPU version 0.9.1 GenuineIntel
> 
> 
> I compiled the nfs-utils by miself and tryed the once provided via rpm
> 
> 	mount.nfs (linux nfs-utils 1.0.9)	(from rpm)
> 	mount.nfs (linux nfs-utils 1.0.11)	(from src)
A little old but should work... nfs-utils 1.1.x release _may_ work
a bit better...
 
> 
> build cachefilesd (ver. 0.9)
This is good but there is the rpm/src I've been using is at:
http://koji.fedoraproject.org/koji/buildinfo?buildID=81367

> 
> mount:
> 	/dev/hda3 on / type ext3 (rw,noatime,user_xattr)
> 	1.2.3.4:/hdisk3 on /mnt/nfs type nfs (rw,bg,intr,soft,fsc,nolock,tcp,addr=1.2.3.4)
> 							      ^^^
Yes... this is key... you know that the mount flag it taking effect.
Note: Not that it has anything to do this but... mount things with 'soft' 
in not a good idea

> 	/dev/loop0 on /var/fscache type ext3 (rw,loop=/dev/loop1,user_xattr)
having 'user_xattr' set on the ext3 filesystem is another key thing...

> 
> when cachefsd is started:
> 
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4448]: About to bind cache
> 	Feb  3 11:27:51 NFS-Cache FS-Cache: Cache "mycache" added (type cachefiles)
> 	Feb  3 11:27:51 NFS-Cache CacheFiles: File cache on loop1 registered
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4448]: Bound cache
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4449]: Daemon Started
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4449]: --> build_cull_table({})
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4449]: dir_read_complete: u=2 e=0
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4449]: Scan complete
> 	Feb  3 11:27:51 NFS-Cache cachefilesd[4449]: <-- build_cull_table({})
> 	Feb  3 11:28:21 NFS-Cache cachefilesd[4449]: Refilling cull table
> 	Feb  3 11:28:21 NFS-Cache cachefilesd[4449]: --> build_cull_table({})
Looks reasonable... the daemon is finding the cache.


> 
> So to me it looks like FSC is not used even through the mount option
> is shown (by the mount cmd).
> 
> Can somebody give me a hint how to track this problem.
So how are testing.... I basically mount the file system,
read in a file that 600mg to 1 gig file, unmount the filesystem
and then reread the file.... watching to see if there is any
network activity

Another good way to monitor things is with:

watch -n0 /proc/fs/fscache/stats

as also use  'df -h /var/fscahe' to see if the 
file system increase in size... 

steved.




More information about the Linux-cachefs mailing list