Max Files Per Directory

fredex fredex at fcshome.stoneham.ma.us
Sat Jul 16 12:04:22 UTC 2005


On Fri, Jul 15, 2005 at 09:29:36PM -0700, Mike McMullen wrote:
> Hi All,
> 
> On an ext3 filesystem what is the limit on the number of files
> per directory?
> 
> What are the factors that effect performance for a "real-world"
> limit? The files that I am looking at would be max 30-40k in
> size.

In general, Unix filesystems don't have a max number of files per directory. 
If you keep adding files, the directory keeps gettin bigger. The directory
is, after all, just a "place" (in the olden days it was actually a file)
where the details of file name and location are stored.

Now, for performance reasons, it is often not a good idea ot have
many thousands of files in a single directory. As the number of files
grows large the time it takes to access a file grows larger. I haven't
looked into this on any linux file system, but on other unixes I've
observed delays reaching up into the whole-second region when many thousands
of files are in a single directory.

-- 
---- Fred Smith -- fredex at fcshome.stoneham.ma.us -----------------------------
                        The Lord is like a strong tower. 
             Those who do what is right can run to him for safety.
--------------------------- Proverbs 18:10 (niv) -----------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050716/4d3500c2/attachment-0001.sig>


More information about the fedora-list mailing list