Re: [PATCHES] O_DIRECT for WAL writes - Mailing list pgsql-hackers

From Curt Sampson
Subject Re: [PATCHES] O_DIRECT for WAL writes
Date
Msg-id Pine.NEB.4.62.0506231205490.12377@angelic.cynic.net
Whole thread Raw
In response to Re: [PATCHES] O_DIRECT for WAL writes  (Greg Stark <gsstark@mit.edu>)
Responses Re: [PATCHES] O_DIRECT for WAL writes
Re: [PATCHES] O_DIRECT for WAL writes
List pgsql-hackers
On Thu, 22 Jun 2005, Greg Stark wrote:

> Tom Lane <tgl@sss.pgh.pa.us> writes:
>
>> Unfortunately, I cannot believe these numbers --- the near equality of
>> fsync off and fsync on means there is something very wrong with the
>> measurements.  What I suspect is that your ATA drives are doing write
>> caching and thus the "fsyncs" are not really waiting for I/O at all.
>
> I wonder whether it would make sense to have an automatic test for this
> problem. I suspect there are lots of installations out there whose admins
> don't realize that their hardware is doing this to them.

But is it really a problem? I somewhere got the impression that some
drives, on power failure, will be able to keep going for long enough to
write out the cache and park the heads anyway. If so, the drive is still
guaranteeing the write.

But regardless, perhaps we can add some stuff to the various OSes'
startup scripts that could help with this. For example, in NetBSD you
can "dkctl <device> setcache r" for most any disk device (certainly all
SCSI and ATA) to enable the read cache and disable the write cache.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.NetBSD.org     Make up enjoying your city life...produced
byBIC CAMERA
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: commit_delay, siblings
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] O_DIRECT for WAL writes