Re: Solaris tmpfs vs. Linux RAMdisk

Jim Gettys (jg@pa.dec.com)
Thu, 15 Apr 1999 08:01:12 -0700


> Sender: owner-linux-kernel@vger.rutgers.edu
> From: "Stephen C. Tweedie" <sct@redhat.com>
> Date: Thu, 15 Apr 1999 14:54:53 +0100 (BST)
> To: grep@oriole.sbay.org
> Cc: Jim Nance <jlnance@avanticorp.com>, linux-kernel@vger.rutgers.edu,
> Stephen Tweedie <sct@redhat.com>
> Subject: Re: Solaris tmpfs vs. Linux RAMdisk
> -----
> Hi,
>
> On Wed, 14 Apr 1999 20:35:23 -0700 (PDT), George Bonser
> <grep@shorelink.com> said:
>
> > On Wed, 14 Apr 1999, Robert Kiesling wrote:
> >> > Notice how Linux writting to an ext2 file system is significantly faster
> >> > than any other OS/FS combination.
>
> > I think this is because when you time ext2 you are actually timing the
> > speed at which Linux writes to the disk BUFFER, not to the disk. The other
> > operating systems do not return from a write until the data is really on
> > the disk, if I remember correctly.
>
> Not true. Some other OSes (in particular, filesystems based on the
> FFS, Berkeley Fast File System) do use some synchronous writes, but
> only when creating and deleting files and only for the metadata, not
> the data itself. Synchronous data writes are only enabled if you
> explicitly ask for them (Linux included).
>
> The reason FFS uses synchronous metadata writes is not to give the
> application any on-disk consistency semantics (although the nature of
> the writes do imply at least some consistency guarantees), but to
> ensure that the order in which metadata structures are updated is
> predictable so that after a crash, the filesystem state can be
> recovered predictably. It does _not_ guarantee to recover your data.

There are more recent versions of Berkeley FFS (I think in BSDI, and maybe
elsewhere) that are not synchronous for metadata, but rely on ordering
of writes of metadata to get predictable recovery.

I'm glad I'm not the one who had to debug this sort of stuff....
- Jim

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/