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

Philipp Wehrheim flipstar at gmx.net
Tue Feb 3 12:47:41 UTC 2009


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)

build cachefilesd (ver. 0.9)

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)
							      ^^^
	/dev/loop0 on /var/fscache type ext3 (rw,loop=/dev/loop1,user_xattr)

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({})


cat /etc/cachefilesd.conf
	dir /var/fscache
	tag mycache
	brun 10%
	bcull 7%
	bstop 3%
	frun 10%
	fcull 7%
	fstop 3%

ls -laR /var/fscache
	/var/fscache:
	total 20
	drwxr-xr-x  5 root root  1024 Feb  2 12:50 .
	drwxr-xr-x 15 root root  4096 Feb  2 13:22 ..
	drwx------  2 root root  1024 Feb  2 12:50 cache	
	drwx------  2 root root  1024 Feb  2 12:50 graveyard
	drwx------  2 root root 12288 Feb  2 12:48 lost+found

	/var/fscache/cache:
	total 3
	drwx------ 2 root root 1024 Feb  2 12:50 .
	drwxr-xr-x 5 root root 1024 Feb  2 12:50 ..

	/var/fscache/graveyard:
	total 2
	drwx------ 2 root root 1024 Feb  2 12:50 .
	drwxr-xr-x 5 root root 1024 Feb  2 12:50 ..

	/var/fscache/lost+found:
	total 13
	drwx------ 2 root root 12288 Feb  2 12:48 .
	drwxr-xr-x 5 root root  1024 Feb  2 12:50 ..


df -h
	Filesystem            Size  Used Avail Use% Mounted on
	/dev/hda3             9.2G  4.0G  4.9G  45% /
	udev                   10M  152K  9.9M   2% /dev
	shm                   351M     0  351M   0% /dev/shm
	1.2.3.4:/hdisk3	       29G  5.5G   23G  20% /mnt/nfs
	/dev/loop0             95M  5.6M   85M   7% /var/fscache


cat /proc/fs/fscache/stats
	FS-Cache statistics
	Cookies: idx=2 dat=0 spc=0
	Objects: alc=0 nal=0 avl=0 ded=0
	ChkAux : non=0 ok=0 upd=0 obs=0
	Pages  : mrk=0 unc=0
	Acquire: n=2 nul=0 noc=0 ok=2 nbf=0 oom=0
	Lookups: n=0 neg=0 pos=0 crt=0
	Updates: n=0 nul=0 run=0
	Relinqs: n=0 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=0 ok=0 wt=0 nod=0 nbf=0 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


cat /proc/fs/fscache/histogram
	JIFS  SECS  OBJ INST  OP RUNS   OBJ RUNS  RETRV DLY RETRIEVLS
	===== ===== ========= ========= ========= ========= =========


cat /proc/fs/nfsfs/volumes
	NV SERVER   PORT DEV     FSID              FSC
	v3 c25f51d1  801 0:17    812:0             no


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.

Thanks
flip




More information about the Linux-cachefs mailing list