[OpenAFS-devel] PATCH: break up cache into reasonable subdirs for large cache sizes

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 9 Jul 2001 10:43:42 -0400 (EDT)


On 8 Jul 2001, Derek Atkins wrote:

> "Neulinger, Nathan" <nneul@umr.edu> writes:
> 
> > I think that I'd be appeased (for the optional part) if two options were
> > available. Like we have -chunksize and -(whatever the other one is) - allow
> > specifying either number of files in cache dir, or number of subdirs. Then,
> > simply special case the numberofsubdirs==1 to skip the subdir part. That
> > would make it compatible/equivalent to existing cache. 
> 
> If you set the -(whatever the other one is) to '30', you will
> effectively put all the cache files into one subdirectory.  It still
> wouldn't be 100% compatible with the current cache style, because all
> the cachefiles would be in /path/to/cache/D0/V* (instead of
> /path/to/cache/V*), but I think reiserfs would work fine with this
> situation.

Nope.  The nature of the reiserfs problem is such that cache performance
suffers unless the cache files are in the root of the filesystem
containing the cache.

This is not because resierfs "handles large numbers of files in one
directory", but because in its attempts to do so, it breaks a fundamental
assumption about UNIX filesystems, which is that you can access a file
knowing only its inode number.  Since the reiserfs people don't seem to
give a damn, the only way this is going to be fixed is if/when we make
some significant, incompatible changes to the way cache file references
are passed into the kernel.

-- Jeff