Re: Filesystem benchmarking for pg 8.3.3 server

From: "Scott Carey" <scott(at)richrelevance(dot)com>
To: "Ron Mayer" <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: "Greg Smith" <gsmith(at)gregsmith(dot)com>, Henrik <henke(at)mac(dot)se>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Filesystem benchmarking for pg 8.3.3 server
Date: 2008-08-13 00:23:31
Message-ID: a1ec7d000808121723m19b33fdk281a09434ecd5309@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Some SATA drives were known to not flush their cache when told to.
Some file systems don't know about this (UFS, older linux kernels, etc).

So yes, if your OS / File System / Controller card combo properly sends the
write cache flush command, and the drive is not a flawed one, all is well.
Most should, not all do. Any one of those bits along the chain can
potentially be disk write cache unsafe.

On Tue, Aug 12, 2008 at 2:47 PM, Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>wrote:

> Greg Smith wrote:
>
>> some write cache in the SATA disks...Since all non-battery backed caches
>> need to get turned off for reliable database use, you might want to
>> double-check that on the controller that's driving the SATA disks.
>>
>
> Is this really true?
>
> Doesn't the ATA "FLUSH CACHE" command (say, ATA command 0xE7)
> guarantee that writes are on the media?
>
> http://www.t13.org/Documents/UploadedDocuments/technical/e01126r0.pdf
> "A non-error completion of the command indicates that all cached data
> since the last FLUSH CACHE command completion was successfully written
> to media, including any cached data that may have been
> written prior to receipt of FLUSH CACHE command."
> (I still can't find any $0 SATA specs; but I imagine the final
> wording for the command is similar to the wording in the proposal
> for the command which can be found on the ATA Technical Committee's
> web site at the link above.)
>
> Really old software (notably 2.4 linux kernels) didn't send
> cache synchronizing commands for SCSI nor either ATA; but
> it seems well thought through in the 2.6 kernels as described
> in the Linux kernel documentation.
> http://www.mjmwired.net/kernel/Documentation/block/barrier.txt
>
> If you do have a disk where you need to disable write caches,
> I'd love to know the name of the disk and see the output of
> of "hdparm -I /dev/sd***" to see if it claims to support such
> cache flushes.
>
>
> I'm almost tempted to say that if you find yourself having to disable
> caches on modern (this century) hardware and software, you're probably
> covering up a more serious issue with your system.
>
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ron Mayer 2008-08-13 00:40:18 Re: Filesystem benchmarking for pg 8.3.3 server
Previous Message Chris Kratz 2008-08-12 21:59:27 Incorrect estimates on correlated filters