Re: With 4 disks should I go for RAID 5 or RAID 10

From: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
To: Bill Moran <wmoran(at)collaborativefusion(dot)com>
Cc: Fernando Hevia <fhevia(at)ip-tel(dot)com(dot)ar>, 'pgsql-performance' <pgsql-performance(at)postgresql(dot)org>
Subject: Re: With 4 disks should I go for RAID 5 or RAID 10
Date: 2007-12-26 22:05:54
Message-ID: 4772D042.8090402@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)mielke(dot)cc>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bill Moran 2007-12-26 22:11:05 Re: With 4 disks should I go for RAID 5 or RAID 10
Previous Message Mark Mielke 2007-12-26 21:59:45 Re: With 4 disks should I go for RAID 5 or RAID 10