pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gael Le Mignot <gael@pilotsystems.net>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Craig James <craig_james@emolecules.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows
Date: Sat, 18 Dec 2010 09:38:41 +0100
Message-ID: <plop87wrn7wk4u.fsf@aoskar.kilobug.org> (raw)
In-Reply-To: <AANLkTi=wPaT_xVU2JGUg_Sc3taOphP0HW487oJHFafXe@mail.gmail.com>
References: <378e24d1e3af88a49fbbb7c4d26f441a@mail.gmail.com>
	<4CFE7964.80206@squeakycode.net>
	<AANLkTi=HiO8ErFwzqBvgjXXHRUMKeUWqCpL-p9Y+oL_-@mail.gmail.com>
	<4CFE8E59.2010505@squeakycode.net>
	<AANLkTin4K86j2-GOUfmdXQ8UKv_j9V8ZRiRBEbbXj+jc@mail.gmail.com>
	<20101207201028.GE4028@aart.is.rice.edu>
	<4CFE97B4.8090708@squeakycode.net>
	<fd4bd31b523753145cf67ae6e6cb4aec@mail.gmail.com>
	<op.vne45kfjeorkce@apollo13>
	<70e424e558d87f649f149bf2948d73cb@mail.gmail.com>
	<4D0B9EB0.1070708@emolecules.com>
	<AANLkTi=wPaT_xVU2JGUg_Sc3taOphP0HW487oJHFafXe@mail.gmail.com>

Hello Scott!

Fri, 17 Dec 2010 19:06:15 -0700, you wrote: 

 > On Fri, Dec 17, 2010 at 10:32 AM, Craig James
 > <craig_james@emolecules.com> 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



view thread (31+ messages)  latest in thread

Message-ID: <plop87wrn7wk4u.fsf@aoskar.kilobug.org>
Permalink:  ../plop87wrn7wk4u.fsf@aoskar.kilobug.org/
Also on:    postgresql.org/message-id/plop87wrn7wk4u.fsf@aoskar.kilobug.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: gael@pilotsystems.net, scott.marlowe@gmail.com, craig_james@emolecules.com
  Subject: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows
  In-Reply-To: <plop87wrn7wk4u.fsf@aoskar.kilobug.org>
  References: <378e24d1e3af88a49fbbb7c4d26f441a@mail.gmail.com> <4CFE7964.80206@squeakycode.net> <AANLkTi=HiO8ErFwzqBvgjXXHRUMKeUWqCpL-p9Y+oL_-@mail.gmail.com> <4CFE8E59.2010505@squeakycode.net> <AANLkTin4K86j2-GOUfmdXQ8UKv_j9V8ZRiRBEbbXj+jc@mail.gmail.com> <20101207201028.GE4028@aart.is.rice.edu> <4CFE97B4.8090708@squeakycode.net> <fd4bd31b523753145cf67ae6e6cb4aec@mail.gmail.com> <op.vne45kfjeorkce@apollo13> <70e424e558d87f649f149bf2948d73cb@mail.gmail.com> <4D0B9EB0.1070708@emolecules.com> <AANLkTi=wPaT_xVU2JGUg_Sc3taOphP0HW487oJHFafXe@mail.gmail.com> <plop87wrn7wk4u.fsf@aoskar.kilobug.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox