Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 235EC159079 for ; Mon, 5 Mar 2012 19:04:12 -0400 (AST) Received: from [2001:1528:137::f1] (helo=mail.gransy.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S4gwt-0004Zv-1o for pgsql-performance@postgresql.org; Mon, 05 Mar 2012 23:04:11 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 76C1B4A2098 for ; Tue, 6 Mar 2012 00:03:58 +0100 (CET) Received: from mail.gransy.com ([82.208.29.194]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id B5KnzkwpVV7a for ; Tue, 6 Mar 2012 00:03:58 +0100 (CET) Received: by mail.gransy.com (Postfix, from userid 5000) id 646AB4A2100; Tue, 6 Mar 2012 00:03:58 +0100 (CET) Received: from [192.168.1.237] (ip-78-45-133-255.net.upcbroadband.cz [78.45.133.255]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 3E4804A2098 for ; Tue, 6 Mar 2012 00:03:58 +0100 (CET) Message-ID: <4F55465E.1030904@fuzzy.cz> Date: Tue, 06 Mar 2012 00:03:58 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: SSD and RAID References: <4F554025.9040101@catalyst.net.nz> In-Reply-To: <4F554025.9040101@catalyst.net.nz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:1528:137::f1 (failed) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201203/60 X-Sequence-Number: 46510 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