[OpenAFS-devel] Default params for afsd?

Jim Rees rees@umich.edu
Thu, 12 May 2005 11:09:40 -0400


These seem to be the defaults for disk cache (mem cache is different):

-blocks (cacheBlocks) NA (read from /usr/vice/etc/cacheinfo)
-chunksize 16 (this is in afs_chunkops.h)
-files (cacheFiles) 1000 (but this is ignored; see below)
-dcache (dCacheSize) 300 (also ignored)
-stat (cacheStatEntries) 300
-volumes (vCacheSize) 50

Most of the defaults are actually ignored.  Instead, they are computed as
follows (see afsd.c around line 1640):

cacheFiles = cacheBlocks / 10;
dCacheSize = 2000;

There is lots of obfuscating code, but I think this is what you get for any
reasonable cache size.  For example, if you set your chunksize ridiculously
low, afsd will make sure you still have enough files to hold all your
chunks.

My suggested new defaults, just for argument:
chunksize = 18
dCacheSize = max(2000, cacheFiles / 10)
cacheStatEntries = 1200

cacheStatEntries is hard because it really depends more on things like the
size of your vnode pool than on things that afsd knows about.  On BSD if you
make it too big then afs becomes a resource hog and the kernel is unhappy.
Even if you know the size of your vnode pool it still makes a big difference
whether you keep everything in afs, or just use it infrequently.
Suggestions?

In any case I would vote to move the default chunksize out of the kernel and
into afsd like everything else.