[CentOS] Regarding LARGE number of files in a folder in linux

Thu Jul 9 17:04:37 UTC 2009
Bob Hoffman <bob at bobhoffman.com>

This goes out to you admins who manage servers with a heavy load of

I would like to know what you do about the number of files in a folder, or
if that is a concern. I think there is a limitation or a slow down if it
gets to big, but what is optimal (if necessary)

Example- running a website that allows a user to upload some photos (small
ones). You get lets say 300,000 users each uploading 10 photos. That's 3
million files.

Storing that in one folder would seem like it would cause an issue when
using that folder, is that right?

If it does, what do you do about that? How do you handle things?

If you have 300,000 clients you could give them their own folder each and
then the folders would have only 10 photos, but one folder would contain
300,000 folders.

SO what is best for file management and system resources?