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

Re: XFS worth it?



On Sat, Apr 16, 2005 at 08:56:12PM +0200, Thomas Steffen wrote:
> On 4/16/05, Brian D. Winters <brianw-debian@pteranodon.org> wrote:
> > 1) mozilla truncates the "old" file
> > 2) mozilla writes the "new" file
> >    a) XFS writes the metadata allocating space for the data and
> >       indicating the size of the new file
> >    b) XFS writes the data to the allocated space
> 
> Yep, and I filed a bug report with mozilla (rather added to an
> existing one), because I think that mozilla should call sync/fsync
> before it considers perfs.js actually written.

Syncs are expensive, and they aren't necessary for something like
mozilla.  The right way to do it, regardless of the underlying
filesystem, is to write to a temp file and then rename the temp file;
you always get a consistent result.  Renames are atomic on journalling
filesystems and damn fast on non-journalling filesystems, but
truncation then write is never atomic, even if you sync immediately
afterwards.  A sync would just shorten the window during which a crash
will give you garbage.  You can achieve the same result by writing a
wrapper script around mozilla that runs mozilla in the foreground and
then calls sync immediately after mozilla terminates; AFAIK mozilla
never writes prefs.js except on exit.

> Because of software aging, of course. Yes, "bit rot" is a nice
> visual for it. 

My point (and I'm probably overly stuck on semantics, but you've been
patient with me so far :) is that software doesn't age.  The upgrade
treadmill may leave it behind, but going along with the upgrade
treadmill is a choice.  Sometimes it is a painful choice (what's more
important, the new features or the old features?), but at least in the
free software world it is still a choice.

> My feeling is that there are about enough filesystems to choose from,
> and people (Linus) would just drop it.

I don't see Linus "stepping up", no. :)  I don't think he'd care at
all if he lost one of XFS, JFS, reiser 3.6, or reiser 4.  Two *might*
make him a little uncomfortable.  But that doesn't preclude someone
else from stepping up to keep XFS going.  XFS has a strong following
among people who work with big files.  And if no one steps up, that
should mean that at least one of the alternatives is at least as good.

In any case, losing XFS from the kernel is way out in the future, if
ever.  I worry a lot more about current stability and performance.  If
you are losing sleep over it, though, reiserfs and IBM's JFS seem to
be the other main contenders.  Either is probably a fine choice.  A
year ago my impression was that JFS was still a little rough around
the edges, but my guess (backed by minimal research) is that today it
is at least as stable as XFS.  I haven't seen anyone claim
(convincingly anyway) that ext3 is anything but a transitional system,
for those who still need ext2 compatibility, or are afraid (often with
good reason) of the vastly more complicated alternatives.

Brian
-- 
If fifty million people say a foolish thing,
it's still a foolish thing.  -- Bertrand Russell



Reply to: