X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0AD3F9DC81B for ; Tue, 27 Dec 2005 03:24:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93371-06 for ; Tue, 27 Dec 2005 03:24:46 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.198]) by postgresql.org (Postfix) with ESMTP id 542249DC80E for ; Tue, 27 Dec 2005 03:24:44 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 13so1324974nzn for ; Mon, 26 Dec 2005 23:24:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=goPMqHX0gGfdgj7mC+ZZOJCC0jBbI0oPiGmOJuL9zyAKh4ZAIv2PoyKsRsdi1vM6kumwmVan7FF/wT6b2qnH9CSkCq6ZIb7OeWAgk2rfXRbxjEhY6YAi8wa0kS3Nb4cBiEVjHPKfGtlTZirnxruxqYyszu2Zm1e2M0P7uQLXMDs= Received: by 10.36.22.17 with SMTP id 17mr4027157nzv; Mon, 26 Dec 2005 23:24:45 -0800 (PST) Received: by 10.36.19.19 with HTTP; Mon, 26 Dec 2005 23:24:45 -0800 (PST) Message-ID: <758d5e7f0512262324i4dccd6bbs87d80e59eb776a8@mail.gmail.com> Date: Tue, 27 Dec 2005 08:24:45 +0100 From: Dawid Kuroczko To: pgsql-performance@postgresql.org Subject: Re: What's the best hardver for PostgreSQL 8.1? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43A84D03.7090002@ritek.hu> <200512212209.50234.caseroj@comcast.net> <200512212231.55100.caseroj@comcast.net> <20051224135042.484c6e32.frank@wiles.org> <6.2.5.6.0.20051224161551.01dc5d98@earthlink.net> <6.2.5.6.0.20051224172653.01dd4c08@earthlink.net> <20051225173755.GA6986@mathom.us> <33c6269f0512260932g38c9b7a4uc2aba00f72ff77@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/628 X-Sequence-Number: 16449 On 12/26/05, David Lang wrote: > raid5 writes n+1 blocks not n+n/2 (unless n=3D2 for a 3-disk raid). you c= an > have a 15+1 disk raid5 array for example > > however raid1 (and raid10) have to write 2*n blocks to disk. so if you ar= e > talking about pure I/O needed raid5 wins hands down. (the same 16 drives > would be a 8+8 array) > > what slows down raid 5 is that to modify a block you have to read blocks > from all your drives to re-calculate the parity. this interleaving of > reads and writes when all you are logicly doing is writes can really hurt= . > (this is why I asked the question that got us off on this tangent, when > doing new writes to an array you don't have to read the blocks as they ar= e > blank, assuming your cacheing is enough so that you can write blocksize*n > before the system starts actually writing the data) Not exactly true. Let's assume you have a 4+1 RAID5 (drives A, B, C, D and E), and you want to update drive A. Let's assume the parity is stored in this particular write on drive E. One way to write it is: write A, read A, B, C, D, combine A+B+C+D and write it E. (4 reads + 2 writes) The other way to write it is: read oldA, read old parity oldE write newA, write E =3D oldE + (newA-oldA) -- calculate difference between new and old A, and apply it to old parity, then write (2 reads + 2 writes) The more drives you have, the smarter it is to use the second approach, unless of course A, B, C and D are available in the cache, which is the niciest situation. Regards, Dawid