Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7B84A2E31E9 for ; Wed, 26 Dec 2007 18:16:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 11772-04-4 for ; Wed, 26 Dec 2007 18:16:09 -0400 (AST) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id B20532E327E for ; Wed, 26 Dec 2007 18:16:09 -0400 (AST) Received: from vanquish.pitbpa0.priv.collaborativefusion.com (vanquish.pitbpa0.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Wed, 26 Dec 2007 17:16:08 -0500 id 00056422.4772D2A8.00013942 Date: Wed, 26 Dec 2007 17:16:08 -0500 From: Bill Moran To: Mark Mielke Cc: Fernando Hevia , 'pgsql-performance' Subject: Re: With 4 disks should I go for RAID 5 or RAID 10 Message-Id: <20071226171608.7fd6e625.wmoran@collaborativefusion.com> In-Reply-To: <4772D042.8090402@mark.mielke.cc> References: <0f9701c84801$399dcff0$8f01010a@iptel.com.ar> <20071226161430.72ef5d31.wmoran@collaborativefusion.com> <4772D042.8090402@mark.mielke.cc> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/387 X-Sequence-Number: 28203 In response to Mark Mielke : > 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. Good point that I wasn't aware of. > 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. I call straw man :) I don't disagree. I simply don't know. There's no reason why it _couldn't_ do consistency checking as it ran ... of course, performance would suck. Generally what you expect out of RAID 5|6 is that it can rebuild a drive in the event of a failure, so I doubt if anyone does consistency checking by default, and I wouldn't be surprised if a lot of systems don't have the option to do it at all. -- Bill Moran Collaborative Fusion Inc. http://people.collaborativefusion.com/~wmoran/ wmoran@collaborativefusion.com Phone: 412-422-3463x4023