EXT3 and large directories

Theodore Tso tytso at mit.edu
Thu Oct 5 18:58:18 UTC 2006

On Thu, Oct 05, 2006 at 07:10:30PM +0100, Alex Bligh wrote:
> I had sort of assumed this wouldn't be a problem after htree was
> incorporated as far speed, as opposed to size is concerned - and speed was
> the original poster's problem, not size on disk. Does that imply there is
> still some linear searching going on, or that htree is not "enough" to
> speed up the searches.

The current implementation of htree doesn't shrink leaf nodes when
they are empty, so if you create a really, really big directory, and
then delete all of the files, the leaf nodes remain in the htree,

So htree will speed up the lookup of *specific* files, but it won't
speed up readdir() scanning a large, empty directory.

						- Ted

More information about the Ext3-users mailing list