Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 397216324F0 for ; Sun, 8 Aug 2010 04:51:08 -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 56055-08 for ; Sun, 8 Aug 2010 07:51:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 8ECEF6322EA for ; Sun, 8 Aug 2010 04:51:00 -0300 (ADT) Received: by wyb39 with SMTP id 39so9036533wyb.19 for ; Sun, 08 Aug 2010 00:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=UnBPBpLOhLwM5LqT1klzDSRoXk5H/55iSQSZ+sw2rPk=; b=R57Gk6DitbHwqxLIMw+fKcAa7JQJX1IPXItAVay4RgcjXPDKx1JiFD+3aW/iBltKl6 xj6KcA/TNUBCsy2doeIlxGCmfCVqI+31/RWt1c0nJewCkpDt3WYeoyLGAZplv11eSbYX WG/1B5ymvb2+5SwGvQJjLKC/639jykuAV9wPE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=vEpyBX/SlyWxBZZ9QKe6JzYFMyXW9+tlul6K7a4Ck4yMW2VOFwrxEOAdl9RdCQxJ3h ZmwObYQUJtgFD+7GES5rUBlFCfV4tilY7wZJYYcq1pRy9uP8GFq1J3BKRVV/z99EPhrs sx3HLoQbeGNjDtMwT4+QOnzbOoQohC/+eN+I4= MIME-Version: 1.0 Received: by 10.227.37.8 with SMTP id v8mr12192686wbd.180.1281253859081; Sun, 08 Aug 2010 00:50:59 -0700 (PDT) Received: by 10.227.127.72 with HTTP; Sun, 8 Aug 2010 00:50:59 -0700 (PDT) In-Reply-To: <1C098DF3-A2AC-4A79-9281-A9B79ADAB1D5@richrelevance.com> References: <1C098DF3-A2AC-4A79-9281-A9B79ADAB1D5@richrelevance.com> Date: Sun, 8 Aug 2010 01:50:59 -0600 Message-ID: Subject: Re: Advice configuring ServeRAID 8k for performance From: Scott Marlowe To: Scott Carey Cc: Pierre C , Kenneth Cox , "pgsql-performance@postgresql.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201008/98 X-Sequence-Number: 39941 On Sun, Aug 8, 2010 at 12:46 AM, Scott Carey wrot= e: > > On Aug 5, 2010, at 4:09 PM, Scott Marlowe wrote: > >> On Thu, Aug 5, 2010 at 4:27 PM, Pierre C wrote: >>> >>>> 1) Should I switch to RAID 10 for performance? =A0I see things like "R= AID 5 >>>> is bad for a DB" and "RAID 5 is slow with <=3D 6 drives" but I see lit= tle on >>>> RAID 6. >>> >>> As others said, RAID6 is RAID5 + a hot spare. >>> >>> Basically when you UPDATE a row, at some point postgres will write the = page >>> which contains that row. >>> >>> RAID10 : write the page to all mirrors. >>> RAID5/6 : write the page to the relevant disk. Read the corresponding p= age >>> from all disks (minus one), compute parity, write parity. >> >> Actually it's not quite that bad. =A0You only have to read from two >> disks, the data disk and the parity disk, then compute new parity and >> write to both disks. =A0Still 2 reads / 2 writes for every write. >> >>> 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. >>> >>> Databases like RAID10 for reads too because when you need some random d= ata >>> you can get it from any of the mirrors, so you get increased parallelis= m on >>> reads too. >> >> 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. =A0This is even true for linux software md >> RAID. > > > My experience is that it is ONLY true for software RAID and ZFS. =A0Most = hardware raid controllers read both mirrors and validate that the data is e= qual, and thus writing is about as fast as read. =A0Tested with Adaptec, 3W= are, Dell PERC 4/5/6, and LSI MegaRaid hardware wise. =A0In all cases it wa= s clear that the hardware raid was not using data from the two mirrors to i= mprove read performance for sequential or random I/O. Interesting. I'm using an Areca, I'll have to run some tests and see if a mirror is reading at > 100% read speed of a single drive or not.