pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron Mayer <rm_pg@cheapcomplexdevices.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Greg Smith <greg@2ndquadrant.com>
Cc: Ron Mayer <rm_pg@cheapcomplexdevices.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: SSD + RAID
Date: Mon, 22 Feb 2010 10:00:34 -0800
Message-ID: <4B82C642.8020409@cheapcomplexdevices.com> (raw)
In-Reply-To: <201002221437.o1MEbDJ13005@momjian.us>
References: <201002221437.o1MEbDJ13005@momjian.us>

Bruce Momjian wrote:
> Greg Smith wrote:
>> .... If you have a regular SATA drive, it almost certainly 
>> supports proper cache flushing....
> 
> OK, but I have a few questions.  Is a write to the drive and a cache
> flush command the same?

I believe they're different as of ATAPI-6 from 2001.

> Which file systems implement both?

Seems ZFS and recent ext4 have thought these interactions out
thoroughly.   Find a slow ext4 that people complain about, and
that's the one doing it right :-).

Ext3 has some particularly odd annoyances where it flushes and waits
for certain writes (ones involving inode changes) but doesn't bother
to flush others (just data changes).   As far as I can tell, with
ext3 you need userspace utilities to make sure flushes occur when
you need them.    At one point I was tempted to try to put such
userspace hacks into postgres.

I know less about other file systems.  Apparently the NTFS guys
are aware of such stuff - but don't know what kinds of fsync equivalent
you'd need to make it happen.

Also worth noting - Linux's software raid stuff (MD and LVM)
need to handle this right as well - and last I checked (sometime
last year) the default setups didn't.

>  I thought a
> write to the drive was always assumed to flush it to the platters,
> assuming the drive's cache is set to write-through.

Apparently somewhere around here:
http://www.t10.org/t13/project/d1410r3a-ATA-ATAPI-6.pdf
they were separated in the IDE world.



view thread (36+ messages)  latest in thread

Message-ID: <4B82C642.8020409@cheapcomplexdevices.com>
Permalink:  ../4B82C642.8020409@cheapcomplexdevices.com/
Also on:    postgresql.org/message-id/4B82C642.8020409@cheapcomplexdevices.com

 · 

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: rm_pg@cheapcomplexdevices.com, bruce@momjian.us, greg@2ndquadrant.com
  Subject: Re: SSD + RAID
  In-Reply-To: <4B82C642.8020409@cheapcomplexdevices.com>

* 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