[OpenAFS] Q: Diskless Clients

David Thompson thomas@cs.wisc.edu
Thu, 08 Feb 2001 08:48:25 -0600

Nathan Neulinger wrote:
>> Yeah, but the memory cache sucks big time.
>> Depending on the architecture, you may be better off mounting a
>> RAM-based file system and using the disk-cache mechanism.  It's sick,
>> but you will probably do better with that than with the memory cache.
>How so? Is it a performance issue, or other problems? Any particular
>data points on i386_linux22?

I looked at this in the early days of the port.  

One problem is structural.  On a disk cache, you can oversubscribe
your cache partition, which is a good thing.  That is, you can create
a cache where the number of chunks times the chunksize is bigger than
your total cache size.  You can't do this with a memory cache.  With a
memory cache, you total cache size is the number of chunks times the
chunk size, and if you don't use the entire chunk (which is what
happens almost all the time), the rest of the space in that chunk
can't be used by a different cache slot.

The other problem is performance.  Largely because of the above, the
benchmarks we ran had better results with a disk-cache-on-a-ram-disk
than with a straight memory cache.

On i386_linux22, on computers where the amount of RAM was much more
than the cache size (256 Megs RAM vs. a 100 Meg cache, IIRC), we
actually saw better performance with a straight disk cache than with a
memory cache (!!).  I think this is because with an abundance of RAM,
linux defers the physical writes indefinitely (or almost indefinitely).

As always, your milage may vary.  Run your own benchmarks, and let
everyone know.  :)

Dave Thompson  <thomas@cs.wisc.edu>

Associate Researcher                    Department of Computer Science
University of Wisconsin-Madison         http://www.cs.wisc.edu/~thomas
1210 West Dayton Street                 Phone:    (608)-262-1017
Madison, WI 53706-1685                  Fax:      (608)-262-6626