Subject: Re: File system performance on i386
To: Christoph Hellwig <hch@lst.de>
From: David Maxwell <david@bester.flfrd1.on.wave.home.com>
List: tech-perform
Date: 02/23/2001 10:44:32
On Fri, Feb 23, 2001 at 10:43:07AM +0100, Christoph Hellwig wrote:
> On Fri, Feb 23, 2001 at 10:13:12AM +0100, Jarom?r Dolecek wrote:
> > Christoph Hellwig wrote:
> > The problem is that since the metadata are written asynchronously
> > (read as "at some undefined time in future" and "at undefined
> > order"),
> Due tue the caching alogoriths it is usually written in order -
> unlike synch were the synch metadata may hit the disk _before_ the
> actual data is commited.  That is bad.

Perhaps you have old disks then, that won't re-order writes on you in
order to optimize seek times. In many cases though, the order in the
cache may not correspond to the write order.

> > it may not have hit the disk yet after the change or may
> > only hit the disk partially. So you CAN'T recover it.
> It may not be there.  True.  It is on the other hand no real problem to
> lose some metadata update - unlike having the metadata without the data.  

No. Go read The Design and Implementation of the 4.4BSD Operating System.

The order of filesystem operations allows fsck to correctly recover
data which would be lost if writes were not performed in an orderly
fashion. There's a lot of research into this design choice, and I've
never been pointed at anything similar for EXT2FS. Feel free to tell
me where to find it.

i.e. If fsck finds data with no file linked to it, on FFS, it knows the
file was deleted(unlinked), but on EXT2FS, the file could have been being
created, or deleted - now what should it do?

> > Try sometimes some bigger disk activity (say, some untarring, deleting)
> > on Linux and BSD. Hit the power switch in the middle of operation.
> > Then compare the results on Linux and BSD after the disks are
> > fscked :)
> 
> I usually lose more data on NetBSD - but fsck doesn't even NOTICE
> all lossage.

Whose fsck doesn't notice? What doesn't it notice? Who 'usually' looses
how much more of what type of data? Don't accuse people of FUD on the
list and then follow up with a completely unqualified statement like
that one.

> > If you really really think async metadata is the way to go, you can
> > mount async if you prefer to. IIRC there is no option to write
> > only metadata sync on ext2fs under Linux though.
> mount -o sync

Nope, that makes metadata and data sync. NetBSD has three options, Linux
has two. (Not counting softdeps as an option, which makes 4 for NetBSD)

							David