> Depending on your file system, the number of files per dir is more or
> less critical. With Reiser v3 it uses your choice of one of I think
> three hashes, any one of which can handle 10s of thousands of files
> per dir. Ext2 gets slow once you exceed a few thousand because
> internally it uses a list. I believe Ext3 and above can use a
> hash--but you have to tell it to do so and mount it accordingly. In
> either case, 4096 files/dir is probably not a huge stretch (unless you
> intend to use ls on it).

This is the kind of information I was looking for.

My previous google attempts were less fruitful, but "benchmark
directory depth ext3" yielded some recent results, but nothing that
answers the question about directory depth or gives reference material
to benchmarks or official claims.

http://serverfault.com/questions/49700/optimal-directory-depth-vs-number-of-files-in-a-directory-for-ext3
http://serverfault.com/questions/49684/linux-filesystems/49716#49716
http://serverfault.com/questions/129953/maximum-number-of-files-in-one-ext3-directory-while-still-getting-acceptable-perf

It sounds like having 4096 nodes per dir will give good performance on
ext3 and ext4.

AJ ONeal

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to