pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Mielke <mark@mark.mielke.cc>
To: Bill Moran <wmoran@collaborativefusion.com>
Cc: Fernando Hevia <fhevia@ip-tel.com.ar>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: With 4 disks should I go for RAID 5 or RAID 10
Date: Wed, 26 Dec 2007 17:05:54 -0500
Message-ID: <4772D042.8090402@mark.mielke.cc> (raw)
In-Reply-To: <20071226161430.72ef5d31.wmoran@collaborativefusion.com>
References: <Pine.LNX.4.64.0712261317320.11785@asgard.lang.hm>
	<0f9701c84801$399dcff0$8f01010a@iptel.com.ar>
	<20071226161430.72ef5d31.wmoran@collaborativefusion.com>

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 <mark@mielke.cc>



view thread (37+ messages)  latest in thread

Message-ID: <4772D042.8090402@mark.mielke.cc>
Permalink:  ../4772D042.8090402@mark.mielke.cc/
Also on:    postgresql.org/message-id/4772D042.8090402@mark.mielke.cc

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mark@mark.mielke.cc, wmoran@collaborativefusion.com, fhevia@ip-tel.com.ar
  Subject: Re: With 4 disks should I go for RAID 5 or RAID 10
  In-Reply-To: <4772D042.8090402@mark.mielke.cc>

* 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