Raw I/O vs files (was Re: Raw partitions / cooked files)

From: P. Gainer <gainer_at_slowmo.almaden.ibm.com>
Date: 27 Jul 93 16:11:37 GMT
Message-ID: <2500_at_coyote.UUCP>


In a recent append, kevinc_at_sequent.com (kevinc) writes...
>>That is only true if the o/s provides *guaranteed* synced writes. We do
>>open all chunks with O_SYNC, but even still this is not 100% reliable across
>>all platforms.
>
> I advocate raw IO for OnLine, but I think there is an amount of paranoia
>in thinking that there is an implementation of Unix where the Kernel can't
>keep track of whether or not the physical IO behind a sync'ed write occurred.
>

Beating the unix file system seems to be the impetus for raw I/O. A while ago, I read one of Stonebraker's papers from a few years ago talking about the reasons standard OS file systems were no good for database systems. He mentioned lack of good contiguity in data, wrong page sizes, poor prefetch algorithms and other things. Since then, file systems have improved.

In the meantime, many unix DBMSes implemented raw I/O. Now it seems to me that doing this allows one to write a filesystem customized for a database. In doing this, one should be able to obtain more performance than one could using the standard OS file system.

Has anyone done much benchmarking to determine whether recent raw I/O implementations are *significantly* faster than file system implementations?

Pat Gainer
gainer_at_almaden.ibm.com Received on Tue Jul 27 1993 - 18:11:37 CEST

Original text of this message