Groups > Superbase > Superbase 2 programming > Re: Not directly a SB question - Files and Directories optimal num




Not directly a SB question - Files and Directories optimal
num

Not directly a SB question - Files and Directories optimal num
Fri, 25 Jan 2008 10:08:48 -050
This isn't directly an SB question. But I'm sure somebody knows the 
answer.  I have a recollection it came up once on the old Compuserve Forum.

I have lots of "image" files.  Older ones were type of TIF, newer ones

are PDFs, there are some other extentionson, but I don't think that is 
important.  They are sequentially numbered A000000.ext to A053124.ext 
and counting.

Previously, I had them all in one directory,e.g.  K:\IMAGES\

There has been an obviously performance hit.  It started a long time ago
and hard drive upgrades have masked the problem.  I've also taken the 
first 10000 or so and put them on another drive because these are older 
and don't get accessed that often. So here is the question.

What is the optimal number of files and (directories/folders).

I think that

1 Directory (Images\ )and 100,000 files is less optimal than

10 Directories (Images0\,Images1\,Images\2, etc.) with 10,000 files

and

100,000 Directories with 1 file each is just stupid (but who knows).

Any thoughts on the correct ratio?

As always, thank you in advance for sage advice usually provided here.

JDK

Post Reply
Re: Not directly a SB question - Files and Directories optimal num
Sat, 26 Jan 2008 20:20:15 -000
> Any thoughts on the correct ratio?
IIRC, back in the days of DOS/FAT16, 2000 files was the cached limit-  
anything over that and it would run like a dog.

What I ended up using would have a theoretical maximum of 2000 files in a  
directory, but would usually be nearer 1000.  After the first hundred  
subdirectories, it would create an extra tier, i.e.

1000\
2000\
..
99000\
1M\100000
1M\100100

(I know 1M is theoretically inaccurate, but who's counting?)

In a later app, Win32-based, I split files up by 5000s and got no  
performance hit at all.

Post Reply
about | contact