pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre C <lists@peufeu.com>
To: Bruce Momjian <bruce@momjian.us>
To: Ron Mayer <rm_pg@cheapcomplexdevices.com>
Cc: Greg Smith <greg@2ndquadrant.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: SSD + RAID
Date: Tue, 02 Mar 2010 09:36:48 +0100
Message-ID: <op.u8xl7mjbeorkce@localhost> (raw)
In-Reply-To: <201003020333.o223Xrf20941@momjian.us>
References: <201003020333.o223Xrf20941@momjian.us>


> I always assumed SCSI disks had a write-through cache and therefore
> didn't need a drive cache flush comment.

Maximum performance can only be reached with a writeback cache so the  
drive can reorder and cluster writes, according to the realtime position  
of the heads and platter rotation.

The problem is not the write cache itself, it is that, for your data to be  
safe, the "flush cache" or "barrier" command must get all the way through  
the application / filesystem to the hardware, going through a nondescript  
number of software/firmware/hardware layers, all of which may :

- not specify if they honor or ignore flush/barrier commands, and which  
ones
- not specify if they will reordre writes ignoring barriers/flushes or not
- have been written by people who are not aware of such issues
- have been written by companies who are perfectly aware of such issues  
but chose to ignore them to look good in benchmarks
- have some incompatibilities that result in broken behaviour
- have bugs

As far as I'm concerned, a configuration that doesn't properly respect the  
commands needed for data integrity is broken.

The sad truth is that given a software/hardware IO stack, there's no way  
to be sure, and testing isn't easy, if at all possible to do. Some cache  
flushes might be ignored under some circumstances.

For this to change, you don't need a hardware change, but a mentality  
change.

Flash filesystem developers use flash simulators which measure wear  
leveling, etc.

We'd need a virtual box with a simulated virtual harddrive which is able  
to check this.

What a mess.




view thread (36+ messages)  latest in thread

Message-ID: <op.u8xl7mjbeorkce@localhost>
Permalink:  ../op.u8xl7mjbeorkce@localhost/
Also on:    postgresql.org/message-id/op.u8xl7mjbeorkce@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lists@peufeu.com, bruce@momjian.us, rm_pg@cheapcomplexdevices.com, greg@2ndquadrant.com
  Subject: Re: SSD + RAID
  In-Reply-To: <op.u8xl7mjbeorkce@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox