[OpenAFS-devel] Large-Cache Initialization (Proposal)

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 6 Jul 2001 10:21:35 -0400 (EDT)


On 6 Jul 2001, Derek Atkins wrote:

> So I tried (and failed) to initialize a 3GB AFS Cache last night.
> I set my Linux (RH 6.2/Linux 2.2/ext2-fs) box to the task around
> 8pm or so last night, and at 9am this morning it was still chugging
> along.  I gave up, newfs'd the cache partition, reset the cache size
> to 325MB, and the initialization was done in a few minutes.
> 
> I'd like to fix this.
> 
> My guess (I haven't done any tests yet, but I will) is that the
> directory is getting so large that the cache-file creation is taking
> more and more time as the cache gets bigger.  My plan would be to
> break up the cache directory into multiple sub-directories, to try to
> keep each directory to a 'reasonable' size (say, ~2000-2500 files?)
> 
> This would definitely require changes to afsd to build/scan a
> directory hierarchy instead of a single directory.  I think it might
> also require changes to 'fs' (for setcachesize).
> 
> I wanted to get feedback about my proposed approach before I spend the
> time to actually build such a system.

That sounds like a fine idea to me.  I don't think it should require
changes to fs setcachesize -- all that does is change what the total cache
size is allowed to be; the number of chunks is fixed at startup time and
cannot be changed.

-- Jeff