gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: readdir() optimization for ext3/Linux 2.6


From: Florian Weimer
Subject: [Gnu-arch-users] Re: readdir() optimization for ext3/Linux 2.6
Date: Mon, 6 Oct 2003 10:36:58 +0200
User-agent: Mutt/1.5.4i

Miles Bader wrote:

> Florian Weimer <address@hidden> writes:
> > I've just finished a patch for Maildir support in mutt CVS that sorts
> > the directory entries by inode before opening them.  Without this
> > optimization, you incur a tremendous seek overhead because due to the
> > new directory hashing, readdir() returns the entries in random order.
> 
> Isn't this filesystem-specific?  How on earth do you tell what sorting
> order is best for a given directory?!?

There's a real degradation only for file systems which issue random
inode numbers which are in no way correlated with disk locations.

We could call statfs() and check for the file system type, either for
each directory or once for the project root.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]