Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C43D62E3198 for ; Wed, 26 Dec 2007 18:09:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 90585-02 for ; Wed, 26 Dec 2007 18:09:02 -0400 (AST) Received: from ironport2-out.pppoe.ca (ironport2-out.pppoe.ca [206.248.154.182]) by postgresql.org (Postfix) with ESMTP id 2D73E2E3180 for ; Wed, 26 Dec 2007 18:09:02 -0400 (AST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAI5fckfO+Igp/2dsb2JhbACpSg X-IronPort-AV: E=Sophos;i="4.24,209,1196658000"; d="scan'208";a="11989254" Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 26 Dec 2007 17:09:01 -0500 Received: from [206.248.136.41] ([206.248.136.41]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id FIJ85100; Wed, 26 Dec 2007 17:09:00 -0500 Message-ID: <4772D042.8090402@mark.mielke.cc> Date: Wed, 26 Dec 2007 17:05:54 -0500 From: Mark Mielke User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Bill Moran CC: Fernando Hevia , 'pgsql-performance' Subject: Re: With 4 disks should I go for RAID 5 or RAID 10 References: <0f9701c84801$399dcff0$8f01010a@iptel.com.ar> <20071226161430.72ef5d31.wmoran@collaborativefusion.com> In-Reply-To: <20071226161430.72ef5d31.wmoran@collaborativefusion.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/385 X-Sequence-Number: 28201 Bill Moran wrote: > In order to recalculate the parity, it has to have data from all disks. Thus, > if you have 4 disks, it has to read 2 (the unknown data blocks included in > the parity calculation) then write 2 (the new data block and the new > parity data) Caching can help some, but if your data ends up being any > size at all, the cache misses become more frequent than the hits. Even > when caching helps, you max speed is still only the speed of a single > disk. > If you have 4 disks, it can do either: 1) Read the old block, read the parity block, XOR the old block with the parity block and the new block resulting in the new parity block, write both the new parity block and the new block. 2) Read the two unknown blocks, XOR with the new block resulting in the new parity block, write both the new parity block and the new block. You are emphasizing 2 - but the scenario is also overly simplistic. Imagine you had 10 drives on RAID 5. Would it make more sense to read 8 blocks and then write two (option 2, and the one you describe), or read two blocks and then write two (option 1). Obviously, if option 1 or option 2 can be satisfied from cache, it is better to not read at all. I note that you also disagree with Dave, in that you are not claiming it performs consistency checks on read. No system does this as performance would go to the crapper. Cheers, mark -- Mark Mielke