Link to home
Start Free TrialLog in
Avatar of boise2004
boise2004

asked on

Do LOTS of files in a folder make webserver slower? (apache 1.3.34)

This is Apache 1.3.34.

I have heard too many folders or files in a folder can slow down a webserver.
(Like, thousands, 10s of thousands, in a folder.)
Is this true for Apache?

If so what is the maximum # of jpgs that should be allowed in one folder?...
What is the maximum # of FOLDERS that should be allowed in one folder?

details:
No browsing or indexing or ftping on the folder.
Only jpgs moved into folder by php and displayed in html.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of m1tk4
m1tk4
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Arty K
I aggree with m1tk4.
I'd prefer b).
Avatar of boise2004
boise2004

ASKER

thanks for the comments -- do you have any idea of how many you can stash in a directory before it becomes a problem?  

by the way, no fopens() done on the files, just move_uploaded_file to dir then served up in html pages.
When you serve the file in html page it does a fopen(), it's just not PHP's fopen(). Moving the files is also slow because most of the time is consumed in reading the directory, and it's done both on fopen() and file moves.

In EXT2/3 you don't have the max number of files in a directory, you have a total maximum number of files and directories (inodes) IN A VOLUME. This ratio is defined when you create a volume by the number of kb you allocate per node. It's quite HIGH.