Home » Questions » Computers [ Ask a new question ]

What is the maximum amount of files to put in 1 folder for performance?

What is the maximum amount of files to put in 1 folder for performance?

I have read in the past that is it good practice/performance to limit the amount of files you put in each folder, in this case it is user uploaded photos,

Asked by: Guest | Views: 135
Total answers/comments: 2
Guest [Entry]

Similar to this question.
Guest [Entry]

"In ext3 filesystems you can have approx 32000 subdirectories in a directory:

For ext2 and ext3 the hard limit is
31998 due to EXT[23]_LINK_MAX being
32000 and each of those subdirectories
(folders) has a link back to its
parent, which began life with a link
count of 2.

The limit for decent performance would
likely be quite a bit less.

Also, structuring your data to avoid hitting such limits has other benefits, for example it makes easier to split a large data store across multiple volumes or even servers."