Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id AB74F6321E9 for ; Sun, 8 Aug 2010 03:46:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 35521-02 for ; Sun, 8 Aug 2010 06:46:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from EXHUB018-1.exch018.msoutlookonline.net (exhub018-1.exch018.msoutlookonline.net [64.78.17.16]) by mail.postgresql.org (Postfix) with ESMTP id 03F0662DB8E for ; Sun, 8 Aug 2010 03:46:18 -0300 (ADT) Received: from EXVMBX018-1.exch018.msoutlookonline.net ([64.78.17.47]) by EXHUB018-1.exch018.msoutlookonline.net ([64.78.17.16]) with mapi; Sat, 7 Aug 2010 23:46:17 -0700 From: Scott Carey To: Scott Marlowe CC: Pierre C , Kenneth Cox , "pgsql-performance@postgresql.org" Date: Sat, 7 Aug 2010 23:46:49 -0700 Subject: Re: Advice configuring ServeRAID 8k for performance Thread-Topic: [PERFORM] Advice configuring ServeRAID 8k for performance Thread-Index: Acs2xWaks27NDjNeQbmE0iZjRIivGw== Message-ID: <1C098DF3-A2AC-4A79-9281-A9B79ADAB1D5@richrelevance.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201008/93 X-Sequence-Number: 39936 On Aug 5, 2010, at 4:09 PM, Scott Marlowe wrote: > On Thu, Aug 5, 2010 at 4:27 PM, Pierre C wrote: >>=20 >>> 1) Should I switch to RAID 10 for performance? I see things like "RAID= 5 >>> is bad for a DB" and "RAID 5 is slow with <=3D 6 drives" but I see litt= le on >>> RAID 6. >>=20 >> As others said, RAID6 is RAID5 + a hot spare. >>=20 >> Basically when you UPDATE a row, at some point postgres will write the p= age >> which contains that row. >>=20 >> RAID10 : write the page to all mirrors. >> RAID5/6 : write the page to the relevant disk. Read the corresponding pa= ge >> from all disks (minus one), compute parity, write parity. >=20 > Actually it's not quite that bad. You only have to read from two > disks, the data disk and the parity disk, then compute new parity and > write to both disks. Still 2 reads / 2 writes for every write. >=20 >> As you can see one small write will need to hog all drives in the array. >> RAID5/6 performance for small random writes is really, really bad. >>=20 >> Databases like RAID10 for reads too because when you need some random da= ta >> you can get it from any of the mirrors, so you get increased parallelism= on >> reads too. >=20 > Also for sequential access RAID-10 can read both drives in a pair > interleaved so you get 50% of the data you need from each drive and > double the read rate there. This is even true for linux software md > RAID. My experience is that it is ONLY true for software RAID and ZFS. Most hard= ware raid controllers read both mirrors and validate that the data is equal= , and thus writing is about as fast as read. Tested with Adaptec, 3Ware, D= ell PERC 4/5/6, and LSI MegaRaid hardware wise. In all cases it was clear = that the hardware raid was not using data from the two mirrors to improve r= ead performance for sequential or random I/O. >=20 >>> with good redundancy. My current performance is 85MB/s write, 151 MB/s >>> reads >>=20 >> FYI, I get 200 MB/s sequential out of the software RAID5 of 3 cheap desk= top >> consumer SATA drives in my home multimedia server... >=20 > On a machine NOT configured for max seq throughput (it's used for > mostly OLTP stuff) I get 325M/s both read and write speed with a 26 > disk RAID-10. OTOH, that setup gets ~6000 to 7000 transactions per > second with multi-day runs of pgbench. >=20 > --=20 > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org= ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance