Re: Solaris tmpfs vs. Linux RAMdisk

Stephen C. Tweedie (sct@redhat.com)
Thu, 15 Apr 1999 14:54:53 +0100 (BST)


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.

> ext2 returns nearly immediately. In other words, just because ext2
> says the data was written to disk, it does not make it so in
> reality.

Just like for all of the other filesystems in question.

Cheers,
Stephen

-
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/