1
  • EXT3 supports 32,000 subdirectories.
  • EXT4 supports 64,000...
  • I've read about people having millions of subdirectories on the XFS filesystem, but can't find an exact value referenced anywhere.

How many subdirectories does the XFS filesystem support?

T. Brian Jones
  • 887
  • 3
  • 17
  • 29

4 Answers4

1

I do not think there is a hard limit except for the maximum file size of 2^64-1 bytes. But there would be a couple of "soft" limits - searching a large directory might become inefficient due to high CPU and/or memory intensity.

From the XFS project site at SGI (a bit aged already):

XFS uses efficient tree structures for fast searches and rapid space allocation. XFS continues to deliver rapid response times, even for directories with tens of thousands of entries.

the-wabbit
  • 40,319
  • 13
  • 105
  • 169
1

There is no limit in theory, look at the "XFS - Maximum subdirectories" in the table (Red Hat Enterprise Linux technology capabilities and limits), please.

2.4. XFS Limits

Terry
  • 111
  • 4
  • 2.4 XFS Limits -link expired. Wikipedia article https://en.wikipedia.org/wiki/XFS refers to maximum number of inodes (assuming one per file). That makes the max. number as 2^64 - 1. Yes, millions. – Jari Turkia Mar 08 '22 at 09:27
0

It's in the millions, I believe.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • 1
    XFS currently limits directory size to ~32 GB: a few hundred million directory entries. – dom0 Mar 23 '16 at 14:58
  • @dom0 the [XFS.org page on limits](http://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/ch02s04.html) does not list that one. Do you happen to have a source? – the-wabbit Apr 25 '16 at 12:24
0

There are of course other practical considerations....like the total length of a filename allowed which may be far less than the number of subdirectories allowed.

Anyway, a subdirectory is just a file anyway, so isn't the absolute maximum number of subdirectories is theoretically the max number of i-nodes on a specific filesystem?

mdpc
  • 11,698
  • 28
  • 51
  • 65
  • Regarding your last question: No. With ext3 and ext4 the maximum amount of subdirectories for a given directory is 32k and 64k respectively. – Gene Feb 28 '15 at 05:21