an AFS cache with fewer files will always perform faster than a
one with more. it is simple to write a tool that analyzes the average
size and age of the files in your AFS cache, and adjust your cache
parameters to optimize performance.
i was surprised to discover that most AFS caches are oversized --
our heavily used campus servers (100-120 users logged in each with
AFS home directories) can get by great with a 32M cache and 1800 files.
using the same tools i used on these machines, i looked at dave's
AFS cache, and found that he could reduce the size of his cache
significantly without adversely affecting his hit rate.
the biggest problem with AFS caches is the number of disk writes.
these are generally slow and synchronous (even though they are
buffered), so if you are hitting the cache hard, disk write request
queuing will slow you down. one of the performance problems with
AFS 3.3a on Solaris 2.3 was solved by optimizing how the AFS cache
manager wrote to its CacheItems file -- i believe this is still
somewhat problematic, though improved, for more recent versions.
if anyone's ever watched the average service request time on a disk
with an AFS cache, you see that it is 10 times worse than regular
UFS-only disks. the cache has a very high ratio of write-to-read.
we've been experimenting with several mechanisms to improve this
behaviour.
a) using memory cache (still see heavy write request load;
haven't figured out why)
b) using tmpfs on Solaris as the cache file system (this
panics the machine when it boots, but would be great
if it worked)
c) striping the cache partition (seems to work but slows
down to normal after a while)
d) using a write-cached disk (probably the best solution
that actually works)
also, in most cases, reducing the number of cache entries will keep
the important AFS cache manager hash tables in a managable state. i
recommend -dcache 500 and -stat less than 5000.
any other ideas, besides changing the cache manager?
Chuck Lever - [EMAIL PROTECTED]
U-M ITD Login service team
dwinkel says:
< > Brian,
< >
< > I can't write much right now, but we are running our http server on AFS
< > with no problems. I am running on a Sun SPARC 5 with a 2GB cache under
< > Solaris 2.5 and AFS 3.4. Again, no problems at this time...Mic
<
< Hmmm... You might want to check AFS performance. My servers run a LOT
< faster with a 180MB cache, than when the cache was 1GB. All those drive
< seeks. (That's another bottleneck, my AFS cache drive is up to 50%+ busy
< according to iostat, so I'm looking for faster drives, or information on
< how well striping the AFS cache works under a heavy load. It's currently
< on a 1 GB Quantum Fireball.)
<
< ~~~~
< [EMAIL PROTECTED] f u cn rd ths, u cn gt
< UofM/ITD Expert Consultant/Web Admin Team a gd jb n cmptr prgmmng
< 535 W. William, Ann Arbor, MI 48103