Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1911B1337B34 for ; Sat, 18 Dec 2010 05:02:12 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 39248-05 for ; Sat, 18 Dec 2010 09:02:04 +0000 (UTC) X-Greylist: delayed 00:23:15.203804 by SQLgrey-1.7.6 Received: from aoskar.kilobug.org (kilobug.org [62.212.118.231]) by mail.postgresql.org (Postfix) with ESMTP id 03B6C133616B for ; Sat, 18 Dec 2010 05:02:03 -0400 (AST) Received: from kilobug by aoskar.kilobug.org with local (Exim 4.72) (envelope-from ) id 1PTsJO-00016Q-CC; Sat, 18 Dec 2010 09:38:42 +0100 From: Gael Le Mignot To: Scott Marlowe Cc: Craig James , pgsql-performance@postgresql.org Subject: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows Organization: Pilot Systems References: <378e24d1e3af88a49fbbb7c4d26f441a@mail.gmail.com> <4CFE7964.80206@squeakycode.net> <4CFE8E59.2010505@squeakycode.net> <20101207201028.GE4028@aart.is.rice.edu> <4CFE97B4.8090708@squeakycode.net> <70e424e558d87f649f149bf2948d73cb@mail.gmail.com> <4D0B9EB0.1070708@emolecules.com> Mail-Copies-To: nobody X-Revolutionnary-Date: 28 Frimaire an 219 de la =?iso-8859-1?Q?R=E9volutio?= =?iso-8859-1?Q?n?= X-PGP-Fingerprint: 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA Date: Sat, 18 Dec 2010 09:38:41 +0100 In-Reply-To: (Scott Marlowe's message of "Fri, 17 Dec 2010 19:06:15 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/228 X-Sequence-Number: 41680 Hello Scott! Fri, 17 Dec 2010 19:06:15 -0700, you wrote: > On Fri, Dec 17, 2010 at 10:32 AM, Craig James > wrote: >> RAID5 is a Really Bad Idea for any database.  It is S...L...O...W.  It does >> NOT give better redundancy and security; RAID 10 with a battery-backed RAID >> controller card is massively better for performance and just as good for >> redundancy and security. > The real performance problem with RAID 5 won't show up until a drive > dies and it starts rebuilding I don't agree with that. RAID5 is very slow for random writes, since it needs to : 1. Read a copy of the old sector you are writing (usually in cache, but not always) ; 2. Read a copy of the parity sector conresponding to it ; 3. Recompute the parity ; 4. Write the new data on the sector you are writing ; 5. Write the new parity data. Operation 3. is fast, but that's still 2 reads and 2 writes for writing a sector, and the writes have to come after the reads, so it can't even be fully parallelised. And if the database has heavy indexes, any INSERT/UPDATE will trigger random writes to update the indexes. Increasing checkpointing interval can group some of the random writes, but they'll still occur. A RAID controller with a lot of cache can mitigate the random write slowness, but with enough random writes, the cache will be saturated anyway. As other people commented, RAID10 is much more efficient for databases, even if it "costs" a bit more (if you put 4 disks in RAID10, you've 2x the capacity of one disk, if you put them in RAID5 you've 3x the capacity of one disk). -- Gaël Le Mignot - gael@pilotsystems.net Pilot Systems - 9, rue Desargues - 75011 Paris Tel : +33 1 44 53 05 55 - www.pilotsystems.net Gérez vos contacts et vos newsletters : www.cockpit-mailing.com