This might be a very general question but I really like to find some detailed answers or clues.
I am discussing this with a friend, trying to convince him to put more than 300,000 files from one single folder to more than one (like 1000 per sub-directory). Those files are images and to be served online web-viewing, like:
www.example.com/folder/1.png
.
.
.
www.example.com/folder/300000.png
I simply remember many years ago when I worked at a online video serving company like Youtube. We put the screenshots in one folder and then the server were always crashing. At that time a "rumor" saying people should not put many files in one folder, but we do not know the detailed reason.
So how many files should I put in one folder? If there is a limitation, why? Any recommended ways to design this?
My server information:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.8 (wheezy)
Release: 7.8
Codename: wheezy
Core Build version:
Linux linode 4.1.5-x86_64-linode61 #7 SMP Mon Aug 24 13:46:31 EDT 2015 x86_64 GNU/Linux
I guess this case applies to many different kind of server software.