Subject: Re: wd, disk write cache, sync cache, and softdep.
To: J Chapman Flack <flack@cs.purdue.edu>
From: Daniel Carosone <dan@geek.com.au>
List: tech-kern
Date: 12/17/2004 07:42:03
--LAK3FBfgZ514qYSN
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.
--
Dan.
--LAK3FBfgZ514qYSN
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iD8DBQFBwfMaEAVxvV4N66cRAqqqAJ4zMWEs1EiIy5uEs6Tf6H4wSIjXcQCeJJSq
zClRjaZ6i0/goooLtSHTG9E=
=xX+B
-----END PGP SIGNATURE-----
--LAK3FBfgZ514qYSN--