From owner-freebsd-stable Wed Oct 24 13:52:25 2001 Delivered-To: freebsd-stable@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 267F337B401 for ; Wed, 24 Oct 2001 13:52:22 -0700 (PDT) Received: from lanczos.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 24 Oct 2001 21:52:19 +0100 (BST) To: Cy Schubert - ITSD Open Systems Group Cc: Anatoliy Dmytriyev , freebsd-stable@FreeBSD.ORG Subject: Re: UFS_DIRHASH - your opinion In-reply-to: Your message of "Wed, 24 Oct 2001 13:41:08 PDT." <200110242041.f9OKfbP47523@cwsys.cwsent.com> X-Request-Do: Date: Wed, 24 Oct 2001 21:52:18 +0100 From: David Malone Message-ID: <200110242152.aa53208@salmon.maths.tcd.ie> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > If you have directories which contains lots of files which are > > accessed repeatedly then it may be a win for you. > This seems like a useful feature. Should this be the default or is it > risky as LINT suggests? Hard to say. The system works by building a hash table of a directory before it is accessed. I think this is on average about as expensive as a handful of directory accesses. After that accesses to that directory should go more quickly. However, if the pattern in which you access directories is random enough you may end up not using the hash table enough to save the cost of building it. I'd guess it would be a win on most systems. If you want to see how much of a win it can be, then try making a directory with a thousand files and then deleting it. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message