Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2001 01:14:57 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>
Cc:        David Malone <dwmalone@maths.tcd.ie>, Anatoliy Dmytriyev <tolid@plab.ku.dk>, freebsd-stable@FreeBSD.ORG
Subject:   Re: UFS_DIRHASH - your opinion 
Message-ID:   <200110250114.aa06003@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Wed, 24 Oct 2001 13:41:08 PDT." <200110242041.f9OKfbP47523@cwsys.cwsent.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110250114.aa06003>