[OpenAFS] need help tuning openafs

Derrick J Brashear shadow@dementia.org
Fri, 3 Sep 2004 21:54:34 -0400 (EDT)


On Fri, 3 Sep 2004, Wes Chow wrote:

>>>> 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)