[OpenAFS] Using tmpfs for afs cache

Cees de Groot cg@cdegroot.com
4 Dec 2001 16:58:11 +0100


David Thompson <thomas@cs.wisc.edu> said:
>- In the presence of abundant memory the performance gains will be small but 
>still present.
>
In the presence of abundant memory the Linux buffer cache will hold whatever
is needed most from all filesystems, not just the AFS cache. From the little I
read on benchmarking, it is almost always better to pool all RAM and give it
to Linux than try to manually influence the kernel's behavior. But this is
bordering on nitpicking, only benchmarks will help here :-)

>- The afs cache can and does exceed the value specified in 
>/usr/vice/etc/cacheinfo from time to time.  We leave 20% overhead in the cache 
>partition and seldom but occassionally see the partition filled.  By using VM, 
>the cache size will typically stay below the cacheinfo value, but when the 
>cache temporarily needs more space, the space is available.
>
Unless that happens when VM fills (I remember ugly things happening here with
Slowaris, but it is all vague so please take my tmpfs remarks with a grain of
salt). Isn't that a risk?

>- You don't have to worry about a corrupt cache (or clearing a disk cache) 
>after a system crash.  Our computer uptimes are measured in weeks, so the 
>initial load of filling a cache isn't significant to us; reducing the chance 
>of having to deal with a corrupt cache is a big win.
>
Now, that's a very good reason. In fact, I'm thinking about accomplishing the
same by mkfs'ing the cache partitions before they are mounted (our uptimes are
in weeks to months as well). 

-- 
Cees de Groot               http://www.cdegroot.com     <cg@cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B