Re: Can linux handle many files on directories?
Hi, (Please start a new thread for new topics and use appropriate list
such as debian-user)
On Thu, Mar 06, 2003 at 04:14:17PM -0400, Patricio Vera S. wrote:
> Hi guys!,
> I'm newbie in Linux and I have a problem : I need hadle about
> 50.000 files in one directory, how Linux handle this? how is the
> performance?, the project is :
If it is ext2/3, it will be not so exiting...
> I have 2000 reports montly, about 270.000 pages reports montly, so
> I think save the report in a
> YYYYMMDD/<name-of-report>/<name-of-report.num-page> tree directory
As others pointed out, use of newer file system is an option for this.
But traditional quick fix in ext2/ext3 file system addressing this kind
of problem (slow linear search of file name), is creating directories
with file name initials and making application to figure out file
location from file names:
YYYY/YYYYMMDD/<first initial>/<2 char. initials>/<name-of-report>/<num>/<name-of-report.num-page>
with index pages in
YYYY/YYYYMMDD/<first initial>/<2 char. initials>/<name-of-report>/index.html
BTW, directry tree by intial means:
/a/aa/aa??? (place all files starting with "aa")
Debian use this kind of trick for its package pool and "squid" stores
its cache files in this manner.
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
Osamu Aoki <firstname.lastname@example.org> Cupertino CA USA, GPG-key: A8061F32
.''`. Debian Reference: post-installation user's guide for non-developers
: :' : http://qref.sf.net and http://people.debian.org/~osamu
`. `' "Our Priorities are Our Users and Free Software" --- Social Contract