Re: SSD and RAID

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: SSD and RAID
Date: 2012-03-05 23:03:58
Message-ID: 4F55465E.1030904@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2012-03-05 23:15:39 Repeat execution of stable expressions
Previous Message Mark Kirkwood 2012-03-05 22:37:25 SSD and RAID