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

Re: htree stabilitity and performance issues



On Wed, Dec 17, 2003 at 05:38:00PM -0500, Theodore Ts'o wrote:
> On Thu, Dec 18, 2003 at 08:18:45AM +1100, Adam Cassar wrote:
> > Being maildir I presumed that the htree patch would improve performance
> > - but I was wrong.
> 
> It depends on the workload.  Things which do readdir scans of
> directories followed by a stat or a open of all of the files in the
> directory actually do worse with htree, because readdir() no longer
> returns files in the order they were created.  This means the inodes
> get opened in random order, which means inode lookups that don't make
> the cache will on average require reading in a new inode table block,
> where as if you read inode 1000, 1001, 1002, 1003, etc., they will all
> be from the same inode table block.  This can be fixed if you modify
> your application to pull all of the filenames using readdir, and then
> sort the files by inode number before trying to open or stat them.   

Reiserfs has a similair issue, and they recommend copying the directory, and
that should re-order the inodes so that when you read them in readdir()
order they will be in that order on disk.  Will that work with ext3+htree?




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