From owner-freebsd-stable Wed Oct 24 17:15: 5 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 E02A837B407 for ; Wed, 24 Oct 2001 17:15:00 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 25 Oct 2001 01:14:57 +0100 (BST) To: Cy Schubert - ITSD Open Systems Group Cc: David Malone , 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> Date: Thu, 25 Oct 2001 01:14:57 +0100 From: Ian Dowse Message-ID: <200110250114.aa06003@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 In message <200110242041.f9OKfbP47523@cwsys.cwsent.com>, Cy Schubert - ITSD Ope >> 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? I'm not aware of any problems with UFS_DIRHASH, but since it was relatively new code added to -stable just a few weeks before 4.4-RELEASE, I wanted a reminder that it could quite possibly cause instability. I'll remove that comment from LINT soon, now that it has been a bit more widely used. Large directories are almost always a poor design choice, so the best advice is to avoid them in the first place. However, some existing applications and systems can end up working with extremely large directories (MH mailboxes, parts of some news filesystems, mail spool directories etc). Here, the CPU time required to perform linear searches of directories can cause a significant impact on the overall system speed. UFS_DIRHASH is really intended for these extreme cases, especially where rewriting the application to use smaller directories is impossible or impractical. To summarise, UFS_DIRHASH does not offer a significant improvement for typical systems (in fact there will be a marginal performance reduction), but where huge directories are accessed it can be a huge win. This marginal slowdown, and the extra memory usage suggest that it should probably remain as an optional feature. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message