[TriLUG] Files in a directory question

Steve Kuekes steve at kuekes.homeip.net
Fri Feb 13 14:23:43 EST 2009


Fellow triluggers,

Here's a question, how many files should I put in one directory on an 
ext3 file system?  I've got an app that needs a bunch of jpg image 
files.  Right now its ~8,000-10,000 but later it could be 2 or 3 times 
that many.  So for performance reasons, should I split these files up 
into multiple sub-directories.  I can split them up according to the 
names and put just 100 or 1000 in each directory so all the files that 
start with a,b,c,d are in one folder called abcd, etc.  or I can just 
put them all in one folder.

I know that theoretically it's probably a very large file number limit 
before it breaks, but for practical performance reasons in accessing 
files in the folder how many is too many?

-- 
Steve Kuekes

Insight Racing - Urban Grand Challenge('07) - http://www.insightracing.org
Private Pilot: N9259R '95 Saratoga based at Sanford-Lee County Regional 
(TTA)



More information about the TriLUG mailing list