Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  • 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?

share|improve this question
What "subdirectories"? Number of entries within a (root) directory? Nesting depth? – the-wabbit Feb 16 '12 at 21:15
Drive is mounted at /files. There are directories numbered 1 through n within /files. – T. Brian Jones Feb 16 '12 at 21:17

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.

share|improve this answer

It's in the millions, I believe.

share|improve this answer
XFS currently limits directory size to ~32 GB: a few hundred million directory entries. – dom0 Mar 23 at 14:58
@dom0 the page on limits does not list that one. Do you happen to have a source? – the-wabbit Apr 25 at 12:24

There are of course other practical 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?

share|improve this answer
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 5:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.