suggestion about file directory structure needed

Hello:
I have a large amout of image files that will be stored in Solaris machine. I read some posts here, but still not sure what to do, please advise. Thanks.
The question is:
shoudl i put all these files in as many level of directories, or put in 2-3 level directories? i.e. which one is better in terms of performance (search a file)? below?
1) top_dir
d1---d10 (5000 files in it)
----d20 (5000 files in it)
----d30 (5000 files in it)
d2---d40 (5000 files in it)
---d50 (5000 files in it)
---d50 (5000 files in it)
d3---d60 (5000 files in it)
---d70 (5000 files in it)
---d80 (5000 files in it)
....
2) top_dir
d1---d10 (10000 files in it)
----d20 (10000 files in it)
----d30 (10000 files in it)
d2---d40 (10000 files in it)
---d50 (10000 files in it)
---d50 (10000 files in it)
a file is from 50k to 1.5MB in size.

general guide line will be good.

thanks

How many d10, d20, ... directories are there? If there are only 10 of them, i.e. d10 - d90, I wouldn't bother with the d1/d2 level.

Keep in mind that you should try and keep the full path names short, because the Solaris DNLC (directory name lookup cache) only records path names of 32 characters or less... or at least that was the case last time I did a performance management course, on Solaris 8. Maybe (hopefully!) it has been increased in 9 or 10.

Its again depend how frequently you access your directory and files.

  • nilesh

2000 - 4000 subdirectories (d1 ... d4000)

access files every minute, but access a few files concurrently.