[OpenAFS] Using tmpfs for afs cache
David Thompson
thomas@cs.wisc.edu
Tue, 04 Dec 2001 09:37:54 -0600
Cees de Groot wrote:
>David Thompson <thomas@cs.wisc.edu> said:
>>These are exactly the reasons that I have not used either the mem cache or th
>e ramdisk cache for our linux computers here. Too bad the tmpfs cache doesn't
> work (yet).
>>
>Would it really be better than doing the same through ext2? After all, Linux
>is quite aggressive in caching (sometimes better than on-controller RAM
>caches), so I don't think you'll see much of a difference. And because tmpfs
>- if it's the same thing as under Solaris - resizes dynamically, wouldn't that
>make the afs client module extremely unhappy?
I see several reasons to do this:
- In the presence of abundant memory the performance gains will be small but
still present.
- 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.
- 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.
To me, the last two reasons are probably more compelling than the first one.
I will always trade a little performance for increased reliability.
Fortunately in this case, I think I can get everything: slightly better
performance _and_ more robustness with the cache manager and system crashes.
Now we just gotta make the thing work...
Dave