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

Derek Atkins warlord@MIT.EDU
07 Jul 2001 10:50:28 -0400


One other optimization I should have pointed out is that before my
patch afsd would have to sweep the cache directory twice if it had to
build any new cache files.  Now I just fstat() the new cache file at
creation time and grab the inode number from there.  That way I dont
have to perform two directory sweeps.

-derek

> Here is the patch for afsd that breaks up the cache into multiple
> subdirs of a more reasonable size.  Using this patch I could create
> a 3GB cache in under 3 minutes on a Linux ext2 FS.  I also added the
> afsd parameter '-files_per_dir' which can set the log(2) size of the
> subdirs.  The default is 11 (2048 files).
> 
> This patch is against the 1.0.4 release.
> 
> Enjoy.
> 
> -derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available