Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2001 22:50:48 -0300 (BRST)
From:      Rik van Riel <riel@conectiva.com.br>
To:        Peter Wemm <peter@wemm.org>
Cc:        Andrew Reilly <areilly@bigpond.net.au>, hackers@FreeBSD.ORG
Subject:   Re: technical comparison 
Message-ID:  <Pine.LNX.4.21.0105272234000.1907-100000@imladris.rielhome.conectiva>
In-Reply-To: <20010526224229.B4B97380E@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 May 2001, Peter Wemm wrote:

> Which is more expensive?  Maintaining an on-disk hashed (or b+tree)
> directory format for *everything* or maintaining a simple low-cost
> format on disk with in-memory hashing for fast lookups?

I bet that for modest directory sizes the cost of disk IO outweighs
the added CPU usage by so much that you may as well take the trouble
of using the more scalable directory format.

> For the small directory case I suspect the FFS+namecache way is more
> cost effective.  For the medium to large directory case (10,000 to
> 100,000 entries), I suspect the FFS+namecache method isn't too shabby,
> providing you are not starved for memory.  For the insanely large
> cases - I dont want to think about :-).

The ext2 fs, which uses roughly the same directory structure as
UFS and has a name cache which isn't limited in size, seems to
bog down at about 10,000 directory entries.

Daniel Phillips is working on a hash extension to ext2; not a
replacement of the directory format, but a way to tack a hashed
index after the normal directory index.

This way the filesystem is backward compatible, older kernels
will just use the old directory format and will clear a flag
when they write to the directory, this can later be used by
the new kernel to rebuild the hashed directory index.

It also has the advantage of being able to keep using the
tried&tested fsck utilities.

Maybe this could be an idea to enhance UFS scalability for
huge directories without endangering reliability ?

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/		http://distro.conectiva.com/

Send all your spam to aardvark@nl.linux.org (spam digging piggy)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0105272234000.1907-100000>