X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 94D85D1C4DC for ; Thu, 24 Jul 2003 18:30:00 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 63013-02 for ; Thu, 24 Jul 2003 15:29:15 -0300 (ADT) Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205]) by svr1.postgresql.org (Postfix) with ESMTP id 73B54D1C4B7 for ; Thu, 24 Jul 2003 15:29:58 -0300 (ADT) Received: from stark.dyndns.tv (H162.C233.tor.velocet.net [216.138.233.162]) by sabre.velocet.net (Postfix) with ESMTP id 83A6A139CC0; Thu, 24 Jul 2003 14:29:34 -0400 (EDT) Received: from localhost ([127.0.0.1] helo=stark.dyndns.tv ident=foobar) by stark.dyndns.tv with smtp (Exim 3.36 #1 (Debian)) id 19fkqM-00070S-00; Thu, 24 Jul 2003 14:29:34 -0400 To: "scott.marlowe" Cc: "Jim C. Nasby" , Alexander Priem , Vincent van Leeuwen , Subject: Re: Tuning PostgreSQL References: In-Reply-To: From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 24 Jul 2003 14:29:33 -0400 Message-ID: <873cgvpylu.fsf@stark.dyndns.tv> Lines: 33 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/408 X-Sequence-Number: 2701 "scott.marlowe" writes: > If you are writing 4k out to a RAID5 of 10 disks, this is what happens: > > (assumiung 64k stipes...) > READ data stripe (64k read) > READ parity stripe (64k read) > make changes to data stripe > XOR new data stripe with old parity stripe to get a new parity stripe > write new parity stripe (64k) > write new data stripe (64k) > > So it's not as bad as you might think. The main negative for RAID5 is that it had to do that extra READ. If you're doing lots of tiny updates then the extra latency to have to go read the parity block before it can write the parity block out is a real killer. For that reason people prefer 0+1 for OLTP systems. But you have to actually test your setup in practice to see if it hurts. A big data warehousing system will be faster under RAID5 than under RAID1+0 because of the extra disks in the stripeset. The more disks in the stripeset the more bandwidth you get. Even for OLTP systems I've had success with RAID5 or not depending largely on the quality of the implementation. The Hitachi systems were amazing. They had enough battery backed cache that the extra latency for the parity read/write cycle really never showed up at all. But it had a lot more than 128M. I think it had 1G and could be expanded. -- greg