[Précédent (date)] [Suivant (date)] [Précédent (sujet)] [Suivant (sujet)] [Index par date] [Index par sujet]

Re: ext2 performance tuning



[email protected] (Julie Lavoie) writes:

> Accessing any files in that application's partitions is extremely
> slow. It takes a full 7 seconds to run an 'ls' listing on a directory
> with ~5000 files.

That's never a good idea.  What some people do is create
subdirectories with the first one or two letters of file name such as
dir/fi/filename to reduce the maximum size of all directories in the
application.  See <URL:ftp://ftp.netcom.com/pub> for example.

It's a little bit like saying ``don't write everything in assembly,
change the algorithm instead.''

If the those very files are visible through the web, you can use this
trick to hide the intermediate subdirs:

        <URL:http://www.engelschall.com/pw/apache/rewriteguide/#structhome>

> Creating a similar directory (with empty files,
> however) on another Linux system, and doing the same ls listing
> only takes 2 seconds.

Is that a simple "ls" or some form of "ls -l"?  If it's the latter,
one possible explanation is that those empty files created all at once
wound up with subsequent inodes on the disk and it's then way faster
for ls to go look at the inode info.  Or it may be something else
altogether.


Charles