EXT3 and large directories

Andreas Dilger adilger at clusterfs.com
Thu Oct 5 21:30:36 UTC 2006

On Oct 05, 2006  19:10 +0100, Alex Bligh wrote:
> How do the deleted entries get reused? EG if I have a mail spool
> application, where a given directory has around 100,000 files in at any
> time, and they are periodically deleted by age in batches of (say) 10,000
> such that the number in the directory never exceeds 100,000, does the size
> of the directory just keep growing for ever? Or do newly created directory
> entries take up the space in the directory of old ones (assume all the
> filenames are unique).

It depends on the hash function, and the nature of the filenames being used.
The hash function should be good at randomizing the hashes, and in the above
case would expect to have a very uniform hash distribution.  That means the
empty entries would be filled relatively uniformly.

Cheers, Andreas
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

More information about the Ext3-users mailing list