pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-performance@postgresql.org
Subject: Re: SSD and RAID
Date: Tue, 06 Mar 2012 00:03:58 +0100
Message-ID: <4F55465E.1030904@fuzzy.cz> (raw)
In-Reply-To: <4F554025.9040101@catalyst.net.nz>
References: <4F554025.9040101@catalyst.net.nz>

Hi, a few personal opinions (your mileage may wary ...)

On 5.3.2012 23:37, Mark Kirkwood wrote:
> Where I work we are starting to look at using SSDs for database server
> storage. Despite the higher per unit cost it is quite attractive to
> replace 6-8 SAS drives in RAID 10 by a pair of SSD in RAID 1 that will
> probably perform better and use less power.

Probably -> depends on the workload. Have you performed any tests to
check it will actually improve the performance? If large portion of your
workload is sequential (e.g. seq. scans of large tables in DSS
environment etc.) then SSDs are not worth the money. For OLTP workloads
it's a clear winner.

Anyway, don't get rid of the SAS drives completely - use them for WAL.
This is written in sequential manner and if you use PITR then WAL is the
most valuable piece of data (along with the base backup), so it's
exactly the thing you want to place on reliable devices. And if you use
a decent controller with a BBWC to absorb the fsync, then it can give as
good performance as SSDs ...

> Which brings up the question of should it be a pair in RAID 1 or just a
> singe drive? Traditionally this would have been a no brainer "Of course
> you want RAID 1 or RAID 10"! However our experience with SSD failure
> modes points to firmware bugs as primary source of trouble - and these
> are likely to impact both drives (nearly) simultaneously in a RAID 1
> configuration. Also the other major issue to watch - flash write limit
> exhaustion - is also likely to hit at the same time for a pair of drives
> in RAID 1.

Yeah, matches my experience. Generally the same rules are valid for
spinners too (use different batches / brands to build an array), but the
firmware bugs are quite annoying.

Using the SAS drives for WAL may actually help you here - do a base
backup regularly and keep the WAL files so that you can do a recovery if
the SSDs fail. You won't loose any data but it takes time to do the
recovery.

If you can't afford the downtime, you should setup a failover machine
anyway. And AFAIK a standby does less writes than the master. At least
that's what I'd do.

But those are my personal oppinions - I suppose others may disagree.

kind regards
Tomas



view thread (8+ messages)  latest in thread

Message-ID: <4F55465E.1030904@fuzzy.cz>
Permalink:  ../4F55465E.1030904@fuzzy.cz/
Also on:    postgresql.org/message-id/4F55465E.1030904@fuzzy.cz

 · 

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: tv@fuzzy.cz
  Subject: Re: SSD and RAID
  In-Reply-To: <4F55465E.1030904@fuzzy.cz>

* 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