[OpenAFS] need help tuning openafs
Wes Chow
wes@woahnelly.net
Fri, 3 Sep 2004 22:04:51 -0400
> >>>>I'm playing with a few of the 45 gig machines now and I've noticed
> >>>>that afsd startup times are unacceptably long. I took the advice from
> >>>>the AFSLore wiki and used "afsd -chunk 17", however just starting afsd
> >>>>on a clean /var/cache/openafs directory takes 20-30 minutes. On an
> >>>>already populated cache directory, it takes maybe 3 or 4 minutes.
> >>>>After it's done, afs_cachetrim runs 80-90% cpu for an unkown period of
> >>>>time. (I have yet to see one finish, and it's been close to 2 hours).
> >>>
> >>>It has to populate the cache, the first time, and scan it on subsequent
> >>>boots, and presumably whichever filesystem you're using for the cache has
> >>>slow access times.
> >>
> >>Is the subsequent scanning what afs_cachetrim does? The second time
> >>it boots, afsd only takes a few minutes to start so it's not so bad.
> >>What's really killing me is the fact that afs_cachetrim hasn't
> >>finished yet and is hogging so much CPU.
>
> subsequent boots are not subsequent scanning. subsequent boots are boots
> after the one where you created the cache from scratch.
>
> >>Is the time it takes to finish proportional to the number of chunks?
> >>I've even tried chunk sizes of 2^30, but that doesn't seem to make
> >>much difference...
>
> afsd startup should take time proportional to the number of files it has
> to play with (create or stat) on the way up. bigger chunksize equals fewer
> files for a cache of the same size (unless you override the number of
> cache files by afsd switch)
Okay, the second time it boots, afs finishes after a few minutes. But
what does afs_cachetrim do? I'm looking through the code, but since I
don't have a great familiarity with it, I can't quite tell... looks
like it's related to when the cache becomes too full, however this is
a completely empty cache I'm dealing with.
Wes
--
http://www.woahnelly.net/~wes/ OpenPGP key = 0xA5CA6644
fingerprint = FDE5 21D8 9D8B 386F 128F DF52 3F52 D582 A5CA 6644