Date: Thu, 24 Apr 1997 17:11:57 -0700 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: Eivind Eklund <eivind@dimaga.com>, Michael Hancock <michaelh@cet.co.jp> Cc: fs@freebsd.org Subject: Re: the namei cache... Message-ID: <199704250011.RAA12811@salsa.gv.tsc.tdk.com> In-Reply-To: Eivind Eklund <eivind@dimaga.com> "Re: the namei cache..." (Apr 24, 3:09pm)
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 24, 3:09pm, Eivind Eklund wrote: } Subject: Re: the namei cache... } } However, replacing the hash algorithm is certainly worthwhile - the present } one is both slow and insensitive to interesting changes (e.g. swapping of } characters). I don't necessarily agree with slow (other than the divide at the end). It *might* be worthwhile escapeing from the loop early on names that are too long to cache, but since these are rare, the extra tests might be too much of a penalty in the common case. I think the current hash function does a poor job of distributing the keys, especially if you have a large cache. A directory containing files with names up to 14 characters of all the characters < 128 can only distribute it's entries over at most 1778 hash buckets. The misc.jobs.offered directory on our news server, which contains 28325 files with 7 digit names, will only distribute its entries over 399 buckets. It looks like we're very dependent on the v_id value to give a good global distribution. --- Truck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704250011.RAA12811>