Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCS9e-0001cL-7c for pgsql-performance@arkaria.postgresql.org; Tue, 07 Jul 2015 12:39:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZCS9d-0002Ib-DL for pgsql-performance@arkaria.postgresql.org; Tue, 07 Jul 2015 12:39:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCS9a-0002Fg-O2 for pgsql-performance@postgresql.org; Tue, 07 Jul 2015 12:39:14 +0000 Received: from wsip-70-169-168-7.pn.at.cox.net ([70.169.168.7] helo=fs.denninger.net) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZCS9W-0001B1-L6 for pgsql-performance@postgresql.org; Tue, 07 Jul 2015 12:39:13 +0000 Received: from [192.168.1.40] (localhost [127.0.0.1]) by fs.denninger.net (8.14.9/8.14.8) with ESMTP id t67Cd8DS073663 for ; Tue, 7 Jul 2015 07:39:08 -0500 (CDT) (envelope-from karl@denninger.net) Received: from [192.168.1.40] [192.168.1.40] (Via SSLv3 AES128-SHA) ; by Spamblock-sys (LOCAL/AUTH) Tue Jul 7 07:39:08 2015 Message-ID: <559BC865.9080804@denninger.net> Date: Tue, 07 Jul 2015 07:39:01 -0500 From: Karl Denninger User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: New server: SSD/RAID recommendations? References: <31701C89A44B714FB8D242F806E7286C5AED32FA@NTXBOIMBX01.micron.com> <559AB332.50304@pinpointresearch.com> <52A08B87-2A8A-43F2-92CE-2514F5AD141B@skogoglandskap.no> <1253229687.3798367.1436264898828.JavaMail.zimbra@desy.de> <985C5CEF-2E55-46AD-A29F-90D48D057A3F@skogoglandskap.no> <1052663055.3807152.1436266613895.JavaMail.zimbra@desy.de> <559BB7D8.6090701@denninger.net> In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms070606050602090908060300" X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org This is a cryptographically signed message in MIME format. --------------ms070606050602090908060300 Content-Type: multipart/alternative; boundary="------------010304060709000405050406" This is a multi-part message in MIME format. --------------010304060709000405050406 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 7/7/2015 06:52, Graeme B. Bell wrote: > Hi Karl, > > Great post, thanks.=20 > > Though I don't think it's against conventional wisdom to aggregate writ= es into larger blocks rather than rely on 4k performance on ssds :-)=20 > > 128kb blocks + compression certainly makes sense. But it might make les= s sense I suppose if you had some incredibly high rate of churn in your r= ows.=20 > But for the work we do here, we could use 16MB blocks for all the diffe= rence it would make. (Tip to others: don't do that. 128kb block performan= ce is already enough out the IO bus to most ssds) > > Do you have your WAL log on a compressed zfs fs?=20 > > Graeme Bell Yes. Data goes on one mirrored set of vdevs, pg_xlog goes on a second, separate pool. WAL goes on a third pool on RaidZ2. WAL typically goes on rotating storage since I use it (and a basebackup) as disaster recovery (and in hot spare apps the source for the syncing hot standbys) and that's nearly a big-block-write-only data stream. Rotating media is fine for that in most applications. I take a new basebackup on reasonable intervals and rotate the WAL logs to keep that from growing without boundary. I use LSI host adapters for the drives themselves (no hardware RAID); I'm currently running on FreeBSD 10.1. Be aware that ZFS on FreeBSD has some fairly nasty issues that I developed (and publish) a patch for; without it some workloads can result in very undesirable behavior where working set gets paged out in favor of ZFS ARC; if that happens your performance will go straight into the toilet. Back before FreeBSD 9 when ZFS was simply not stable enough for me I used ARECA hardware RAID adapters and rotating media with BBUs and large cache memory installed on them with UFS filesystems. Hardware adapters are, however, a net lose in a ZFS environment even when they nominally work well (and they frequently interact very badly with ZFS during certain operations making them just flat-out unsuitable.) All-in I far prefer ZFS on a host adapter to UFS on a RAID adapter both from a data integrity and performance standpoint. My SSD drives of choice are all Intel; for lower-end requirements the 730s work very well; the S3500 is next and if your write volume is high enough the S3700 has much greater endurance (but at a correspondingly higher price.) All three are properly power-fail protected. All three are much, much faster than rotating storage. If you can saturate the SATA channels and need still more I/O throughput NVMe drives are the next quantum up in performance; I'm not there with our application at the present time. Incidentally while there are people who have questioned the 730 series power loss protection I've tested it with plug-pulls and in addition it watchdogs its internal power loss capacitors -- from the smartctl -a display of one of them on an in-service machine here: 175 Power_Loss_Cap_Test 0x0033 100 100 010 Pre-fail=20 Always - 643 (4 6868) --=20 Karl Denninger karl@denninger.net /The Market Ticker/ /[S/MIME encrypted email preferred]/ --------------010304060709000405050406 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 7/7/2015 06:52, Graeme B. Bell wrote:
Hi Karl,

Great post, thanks.=20

Though I don't think it's against conventional wisdom to aggregate writes=
 into larger blocks rather than rely on 4k performance on ssds :-)=20

128kb blocks + compression certainly makes sense. But it might make less =
sense I suppose if you had some incredibly high rate of churn in your row=
s.=20
But for the work we do here, we could use 16MB blocks for all the differe=
nce it would make. (Tip to others: don't do that. 128kb block performance=
 is already enough out the IO bus to most ssds)

Do you have your WAL log on a compressed zfs fs?=20

Graeme Bell
Yes.

Data goes on one mirrored set of vdevs, pg_xlog goes on a second, separate pool.=A0 WAL goes on a third pool on RaidZ2.=A0 WAL typicall= y goes on rotating storage since I use it (and a basebackup) as disaster recovery (and in hot spare apps the source for the syncing hot standbys) and that's nearly a big-block-write-only data stream.=A0= Rotating media is fine for that in most applications.=A0 I take a new= basebackup on reasonable intervals and rotate the WAL logs to keep that from growing without boundary.

I use LSI host adapters for the drives themselves (no hardware RAID); I'm currently running on FreeBSD 10.1.=A0 Be aware that ZFS on= FreeBSD has some fairly nasty issues that I developed (and publish) a patch for; without it some workloads can result in very undesirable behavior where working set gets paged out in favor of ZFS ARC; if that happens your performance will go straight into the toilet.

Back before FreeBSD 9 when ZFS was simply not stable enough for me I used ARECA hardware RAID adapters and rotating media with BBUs and large cache memory installed on them with UFS filesystems.=A0 Hardwar= e adapters are, however, a net lose in a ZFS environment even when they nominally work well (and they frequently interact very badly with ZFS during certain operations making them just flat-out unsuitable.)=A0 All-in I far prefer ZFS on a host adapter to UFS on a= RAID adapter both from a data integrity and performance standpoint.
My SSD drives of choice are all Intel; for lower-end requirements the 730s work very well; the S3500 is next and if your write volume is high enough the S3700 has much greater endurance (but at a correspondingly higher price.)=A0 All three are properly power-fail protected.=A0 All three are much, much faster than rotating storage.=A0= If you can saturate the SATA channels and need still more I/O throughput NVMe drives are the next quantum up in performance; I'm not there with our application at the present time.

Incidentally while there are people who have questioned the 730 series power loss protection I've tested it with plug-pulls and in addition it watchdogs its internal power loss capacitors -- from the smartctl -a display of one of them on an in-service machine here:
=
175 Power_Loss_Cap_Test=A0=A0=A0=A0 0x0033=A0=A0 100=A0=A0 100=A0=A0 = 010=A0=A0=A0 Pre-fail=A0 Always=A0=A0=A0=A0=A0=A0 -=A0=A0=A0=A0=A0=A0 643 (4 6868)


--
Karl Denninger
karl@denninger.net
The Market Ticker
[S/MIME encrypted email preferred]
--------------010304060709000405050406-- --------------ms070606050602090908060300 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGXzCC BlswggRDoAMCAQICASkwDQYJKoZIhvcNAQELBQAwgZAxCzAJBgNVBAYTAlVTMRAwDgYDVQQI EwdGbG9yaWRhMRIwEAYDVQQHEwlOaWNldmlsbG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