Linux – How many subdirectories does the XFS filesystem support within a given directory

ext3ext4filesystemslinuxxfs

  • 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?

Best Answer

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.