Data Storage - Read commands in RAID-5

This is Interesting: Free IT Magazines  
Home > Archive > Data Storage > November 2005 > Read commands in RAID-5





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Read commands in RAID-5
Erez

2005-11-13, 7:46 am

Hi,

I'm trying to understand the behavior of a RAID-5 controller when
executing long READ commands:
For READ commands with long data length, the controller may have to
read several blocks from each disk. Since all disks contain parity
blocks, the controller will need to skip them when reading from a disk.
For example:
D0-D3 are disks 0-3.
P0-P2 are the parity blocks.
00-08 are the requested data blocks.

D0 D1 D2 D3
00 01 02 P0
03 04 P1 05
06 P2 07 08

Now, the controller has to read blocks 02 & 07 from disk 2. Will it use
a single READ command and throw away the parity block (P1) or will it
use 2 READ commands? Is there another option?

Thanks
Erez

Rob Turk

2005-11-13, 7:46 am

"Erez" <erezz@tx.technion.ac.il> wrote in message
news:1131879927.362591.24130@g47g2000cwa.googlegroups.com...
> Hi,
>
> I'm trying to understand the behavior of a RAID-5 controller when
> executing long READ commands:
> For READ commands with long data length, the controller may have to
> read several blocks from each disk. Since all disks contain parity
> blocks, the controller will need to skip them when reading from a disk.
> For example:
> D0-D3 are disks 0-3.
> P0-P2 are the parity blocks.
> 00-08 are the requested data blocks.
>
> D0 D1 D2 D3
> 00 01 02 P0
> 03 04 P1 05
> 06 P2 07 08
>
> Now, the controller has to read blocks 02 & 07 from disk 2. Will it use
> a single READ command and throw away the parity block (P1) or will it
> use 2 READ commands? Is there another option?
>
> Thanks
> Erez


There's controllers that will figure out the shortest mix of data and parity
blocks it needs to reconstruct all data and read accordingly. So in your
example it may choose to only read blocks 02 and P1, and recalculate block
07 on the fly from blocks it read from the other drives.. Depends if the
hardware on the controller can reconstruct faster than it takes to read a
single block..

Rob


Erez

2005-11-13, 7:46 am

Thanks, Rob.

I didn't think about this optimization. BTW - why will it read P1? If
the controller doesn't intend to really read block 07, it can read only
block 02. The only explaination that I see is that it may use P1 in
order to calculate values of other data blocks in the same parity group
(stripe).

Are there other optimizations for this problem?

Erez

Erez

2005-11-13, 7:46 am

I'm trying to check if the following optimization makes sense:
When the controller wants to read blocks 02 & 07 (without P1), it will
use SCSI PRE-FETCH command to ask the disk to read 02, P1 & 07 to its
cache and then, the controller will send 2 READ commands (for 02 & for
07). By doing that, only a single disk operation is required and
unnecessary data isn't written to the data-in buffer.

Again, here's the example that I'm talking about:
D0-D3 are disks 0-3.
P0-P2 are the parity blocks.
00-08 are the requested data blocks.

D0 D1 D2 D3
00 01 02 P0
03 04 P1 05
06 P2 07 08

Do you have any idea if vendors use something like that? I don't know
if it makes sense in terms of latency and throughput.

Thanks
Erez

Rob Turk

2005-11-13, 5:47 pm

"Erez" <erezz@tx.technion.ac.il> wrote in message
news:1131888133.316976.246140@g14g2000cwa.googlegroups.com...
> I'm trying to check if the following optimization makes sense:
> When the controller wants to read blocks 02 & 07 (without P1), it will
> use SCSI PRE-FETCH command to ask the disk to read 02, P1 & 07 to its
> cache and then, the controller will send 2 READ commands (for 02 & for
> 07). By doing that, only a single disk operation is required and
> unnecessary data isn't written to the data-in buffer.
>
> Again, here's the example that I'm talking about :
> D0-D3 are disks 0-3.
> P0-P2 are the parity blocks.
> 00-08 are the requested data blocks.
>
> D0 D1 D2 D3
> 00 01 02 P0
> 03 04 P1 05
> 06 P2 07 08
>
> Do you have any idea if vendors use something like that? I don't know
> if it makes sense in terms of latency and throughput.
>
> Thanks
> Erez


I think you should take a look at the overhead involved with sending a
command, versus transferring an extra block of data. You may find that the
data transfer of an extra block takes nowhere near as much time as sending
extra commands. I don't have the specs in front of me, but I'm sure you can
do the math yourself to find if it makes sense.

Rob


erezzi@gmail.com

2005-11-15, 7:50 am

That's what I thought. Thanks a lot for your help.

Erez

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com