Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 642527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:10:54+00:00 2026-05-13T21:10:54+00:00

I develop some PHP project on Linux platform. Are there any disadvantages of putting

  • 0

I develop some PHP project on Linux platform. Are there any disadvantages of putting several thousand images (files) in one directory? This is closed set which won’t grow. The alternative would be to separate this files using directory structure based on some ID (this way there would be let’s say only 100 in one directory).

I ask this question, because often I see such separation when I look at images URLs on different sites. You can see that directory separation is done in such way, that no more then several hundreds images are in one directory.

What would I gain by not putting several thousand files (of not growing set) in one directory but separating them in groups of e.g. 100? Is it worth complicating things?

UPDATE:

  • There won’t be any programmatic iteration over files in a directory (just a direct access to an image by it’s filename)
  • I want to emphasize that the image set is closed. It’s less then 5000 images, and that is it.
  • There is no logical categorization of this images
  • Human access/browse is not required
  • Images have unique filenames
  • OS: Debian/Linux 2.6.26-2-686, Filesystem: ext3

VALUABLE INFORMATION FROM THE ANSWERS:

Why separate many files to different directories:

  • “32k files limit per directory when using ext3 over nfs”
  • performance reason (access speed) [but for several thousand files it is difficult to say if it’s worth, without measuring ]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:10:54+00:00Added an answer on May 13, 2026 at 9:10 pm

    usually the reason for such splitting is file system performance.
    for a closed set of 5000 files I am not sure it’s worth the hassle.
    I suggest that you try the simple approach of putting all the files in one directory thing, but keep an eye open on the actual time it takes to access the files.

    if you see that it’s not fast enough for your needs, you can split it like you suggested.

    I had to split files myself for performance reasons.
    in addition I bumped into a 32k files limit per directory when using ext3 over nfs (not sure if it’s a limit of nfs or ext3).
    so that’s another reason to split into multiple directories.
    in any case, try with a single dir and only split if you see it’s not fast enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some advice from experts :) I will develop a website using PHP
I have try to simulate and develop base of some zend project and in
I'm working on a little project, basically I have some text on my PHP/HTML
We have several branches of one project that share about half of the code
i want to develop some php stuff with a friend together. We managed to
I've managed to develop some code in php which would use a mobile template
I develop some unit tests with trying to connect to the Derby internal database
I develop some native libraries for Android and use Boost libraries - just headers-based
I need to develop some sort of application featuring Editing Movie slices, Adding and
i have some WinForms app (Framework to develop some simple apps), written in C#.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.