[OpenAFS] clarification on client caches

Wes Chow wes@woahnelly.net
Mon, 6 Sep 2004 17:15:51 -0400


I'm a bit confused about how client side caches are organized.  My
understanding is that the client cache contains a bunch of Vn files
which are analagous to disk blocks and can hold between 0 and
chunksize (by default 64k) bytes.  This would imply that the size of
the cache is the number of Vn files times the chunksize.  Is this
correct?

If so, why is it that the Debian afs.conf file provides a couple
options to afsd, two of which are:

XXLARGE="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
XLARGE="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"

According to openafs documentation, "-files 50000" forces the daemon
to maintain 50000 Vn files, which at the default chunksize of 64k
means a fixed maximum cache of about 3 gigs.  With these options, it
seems as if the cachesize in /etc/openafs/cacheinfo would be ignored.

However, when I set cacheinfo to have a 20 gig cache while using
XXLARGE, "fs getcacheparms" returns

AFS using 0 of the cache's available 20000000 1K byte blocks.

Does this mean that afsd has automatically calculated an appropriate
chunksize and ignored the default?  How can that be... if I cat a file
that's about 300M, and run "fs getcachparms", I get:

AFS using 306031 of the cache's available 20000000 1K byte blocks.

There are 50000 Vn files:

base:/var/cache/openafs# find D* -iname "V*" | wc -l
50000

None of which are larger than 64k.  Additionally, I can use "fs
setcachsize" to change the cachesize to larger than 20000000, but
neither the number of Vn files or the size of them seems to increase.

In short, I'm finding that number of Vn files times chunksize doesn't
equal the cachesize.  What am I missing?

Thanks.

Wes

-- 
http://www.woahnelly.net/~wes/          OpenPGP key = 0xA5CA6644
fingerprint = FDE5 21D8 9D8B 386F 128F  DF52 3F52 D582 A5CA 6644