Re: stat benchmark

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ulrich Drepper <drepper@...>
Cc: Soeren Sandmann <sandmann@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 7:53 am

On Sun, Apr 27, 2008 at 09:43:05PM -0700, Ulrich Drepper wrote:

I'm not sure this would help in the cold cache case, which is what
Soeren originally complained about.[1] The problem is whaever
information the user might need won't be store in the directory, so
the filesystem would end having to stat the file anyway, incurring a
disk seek, which was what the user was complaining about.  A
readdirplus() would save a whole bunch of system calls if the inode
was already cached, yes, but I'm not sure that's it would be worth the
effort given how small Linux's system call overhead would be.  But in
the cold cache case, you end up seeking all over the disk, and the
only thing you can do is to try to keep the inodes close to each
other, and to have either readdir() or the caller of readdir() sort
all of the returned directory entries by inode number to avoid seeking
all over the disk.

							- Ted


[1] At least, not without making filesystem modifications; the problem
is that if you're going to store the inode information (or part of the
inode information) in the directory it has to get updated each time
the inode gets updated, and that gets painful with hardlinks.  There
was a Usenix paper which explored this idea over ten years ago, and
it's possible --- but then all directory entries need to have linked
list so that that you can either (a) find the "master" directory entry
which contains the inode information and be able to migrate inode
information to another directory entry when the originl "master"
dirent gets deleted, or (b) you keep the subset of the inode
information in all of the directory entries of the hardlink, and have
to update them all each time the inode information changes.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
stat benchmark, Soeren Sandmann, (Thu Apr 24, 4:59 pm)
Re: stat benchmark, Ulrich Drepper, (Mon Apr 28, 12:43 am)
Re: stat benchmark, Theodore Tso, (Mon Apr 28, 7:53 am)
Re: stat benchmark, J. Bruce Fields, (Mon Apr 28, 12:18 pm)
Re: stat benchmark, Avi Kivity, (Mon Apr 28, 7:59 am)
Re: stat benchmark, Theodore Tso, (Mon Apr 28, 9:31 am)
Re: stat benchmark, Carl Henrik Lunde, (Sun Apr 27, 6:40 pm)
Re: stat benchmark, Zach Brown, (Mon Apr 28, 1:46 pm)
Re: stat benchmark, Theodore Tso, (Fri Apr 25, 3:48 pm)
Re: stat benchmark, Soeren Sandmann, (Sun Apr 27, 7:29 pm)
Re: stat benchmark, Theodore Tso, (Sun Apr 27, 10:10 pm)
Re: stat benchmark, Carl Henrik Lunde, (Sun Apr 27, 8:13 pm)
Re: stat benchmark, Alexander Larsson, (Mon Apr 28, 3:41 pm)
Re: stat benchmark, Jan Engelhardt, (Thu Apr 24, 5:44 pm)
Re: stat benchmark, Christoph Hellwig, (Fri Apr 25, 3:01 am)
Re: stat benchmark, Justin Banks, (Thu Apr 24, 10:27 pm)
Re: stat benchmark, Carl Henrik Lunde, (Thu Apr 24, 5:42 pm)