Large Directories

Nick Barkas nick.barkas at gmail.com
Thu Nov 20 01:01:13 PST 2008


On Wed, Nov 19, 2008 at 15:39, Dan <dan-freebsd-fs at ourbrains.org> wrote:
> Nick Barkas(nick.barkas at gmail.com)@2008.11.19 14:29:24 +0100:
> I know about dirhash, but it blows out at a few dozen thousand files.

This is because the default maximum amount of memory dirhash is
allowed to use is only 2MB. Try increasing vfs.ufs.dirhash_maxmem. Of
course, if you do have a directory larger than the amount of memory
you can allow dirhash (e.g. millions of files in a directory on a
system that doesn't have tens or hundreds of MB of memory to spare),
dirhash can't help you. I just did a test creating ten million fake
email messages in a maildir, and dirhash needed about 260MB of memory
for it.

Nick


More information about the freebsd-fs mailing list