Maximum number of files one ext3 directory while still getting acceptable performance?
Posted
by knorv
on Stack Overflow
See other posts from Stack Overflow
or by knorv
Published on 2010-04-05T16:12:40Z
Indexed on
2010/04/05
16:13 UTC
Read the original article
Hit count: 312
I have an application writing to an ext3 directory which over time has grown to roughly three million files. Needless to say, reading the file listing of this directory is unbearably slow.
I don't blame ext3. The proper solution would have been to let the directory write to sub-directories such as ./a/b/c/abc.ext
rather than just ./abc.ext
.
I'm changing to such a sub-directory structure and my question is simply: roughly how many files should I expect to store in one ext3 directory while still getting acceptable performance?
Or in other words; assuming that I need to store three million files in the structure, how many levels deep should the ./a/b/c/abc.ext
structure be?
Obviously this is a question that cannot be answered exactly, but I'm looking for a ball park estimate.
© Stack Overflow or respective owner