Subject: Re: wd, disk write cache, sync cache, and softdep.
To: J Chapman Flack <>
From: Daniel Carosone <>
List: tech-kern
Date: 12/17/2004 07:42:03
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Dec 16, 2004 at 03:22:38PM -0500, J Chapman Flack wrote:
> I've often wondered how the implications of hardware features like
> write-back disk caches get addressed in higher software layers than
> the OS code itself, such as the write-ahead log protocol in a database
> engine.  My long-standing suspicion has been that I would really rather
> not know; I'm probably lucky if I'm using an OS that is really enforcing
> what it thinks it's enforcing in filesystem integrity, and it's probably
> more like a miracle if some DBMS I've installed is really
> doing the right things needed to get its WALP updates all the way down
> to the media.  But I don't really know the state of the art.  Do all
> transactional DBMSs have an inescapably OS-specific layer of logging
> code where for NetBSD it would set this flag, and for another OS do
> something else?  Is there any common practice existing or emerging that
> we could track?

It comes down to one of three things:

 - use raw devices
 - fsync()
 - aio

All three of these things rely on the OS drivers knowing that the
write is really-complete, and can be screwed by write-cache.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (NetBSD)