Yaron Minsky | 12 Jun 2004 00:59
Picon
Gravatar

Re: Re: directory access time for jfs vs. ext3

On Fri, 11 Jun 2004 12:39:34 -0500, Dave Kleikamp <shaggy <at> austin.ibm.com> wrote:
> 
> On Fri, 2004-06-11 at 11:24, Yaron Minsky wrote:
> > On Wed, 2004-06-09 at 14:20, Dave Kleikamp wrote:
> > > On Wed, 2004-06-09 at 11:17, Charles Floyd wrote:
> > > >
> > > > [11:13:21 cfloyd <at> frontend-0 2004-01-02]$ time ls -1 | wc -l
> > >
> > > 'ls -l' not only reads the directory, but reads the inode for each entry
> > > in order to get the file-type, size, modification times, etc.
> >
> > That's actually not -l (the letter l), but rather -1 (the number 1).
> > i.e., it was listed in single-column mode, to ensure that the number of
> > lines was equal to the number of files.
> 
> Oops.  It's hard to tell the difference in the font I'm using.  :^)
> 
> > Even then, though, the difference in performance seems pretty huge ---
> > almost two orders of magnitude.  Are 2-second ls times normal for a
> > large JFS directory?  I thought JFS was supposed to beat ext3 on large
> > directories in particular.
> 
> I'm not sure what the reason for the difference is.  I don't think there
> is an expectation that jfs would enumerate a directory faster than ext3,
> as you need to read both directories in their entirety.  I would expect
> jfs to lookup a particular entry faster than ext3.  Of course,
> benchmarking a path lookup may be difficult, because you would have to
> make sure the entry was not cached in the dcache.

That's fair enough --- you are iterating over the whole thing, so
(Continue reading)


Gmane