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?

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

Thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It's true for any server, because it makes the filesystem slower. Basically, the more files/folders you have in a single directory, the slower fopen()s are going to be - doesn't matter if they are done by Apache, PHP or else.

The solutions are:

a) switch to a filesystem that is faster at handling large directories (ReiserFS, JFS)

b) organize your files in subdirectories, like pics/012345.jpg woud become pics/012/012345.jpg for example.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I aggree with m1tk4.
I'd prefer b).
boise2004Author Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.