Many images in the same folder in a Linux based application
I have a Linux based application (Drupal - PHP + Apache + MySQL) that is
quickly scaling to hold thousands of pictures in the same folder. I am
probably close to 2,000 right now. Are there any drawbacks of having so
many images in a single folder? Could it represent an impact in terms of
performance?
I am not planning to browse files in that folder and the server is simply
serving the images when their URL is requested, but I wonder if I will
have problems in the future (the application is scaling, scaling in terms
of number of pictures and it could go as far as 20,000, 30,000 images...).
Maybe I should plan a strategy for splitting this monstrous images folder
into subfolders, like using usernames for subfolders, or the year-month
the picture was uploaded.
In a nutshell, the questions are: is it bad to have thousands of images in
the same folder for a Linux server (not sure which flavor is being used
for my app, it is actually in a shared hosting environment)? Should I do
something to avoid this approach and split those items into subfolders?
Are there any recommendations in terms of number of files per folder, or
maximum number of files per folder?
Thank you for sharing your thoughts about this.
No comments:
Post a Comment