[K12OSN] RAID5 so slow?

Michael C Wescott wescott at sc.rr.com
Tue May 3 00:04:36 UTC 2005


On Mon, 2005-05-02 at 06:54, Mella wrote:

> Computer 1- Intel HG2 MB, DualXeon 2,8GHz, Intel RAID U320 add-on 
> controller with 3 disks RAID5 array.
> 
> array (sda) 3x73GB Atlas 10K3 Kernel 2.6.11-1.14_FC3smp #1 SMP
> 
> [root at ts ~]# hdparm -t /dev/sda
> /dev/sda: Timing buffered disk reads:   82 MB in  3.02 seconds =  27.18 
> MB/sec
> 
> Computer 2 - Intel VB2 DualXeon 2,4GHz, Adaptec U160.
> Disk (sda) 36GB Atlas 10K4 Kernel 2.4.30-1.smp.dma #1 SMP (self compiled)
> 
> [root at mail root]# hdparm -t /dev/sda
> /dev/sda: Timing buffered disk reads:  64 MB in  0.95 seconds = 67.37 
> MB/sec
> ====
> Why faster disk and controller give slower performance data with RAID?

I'm guessing a little here since it's not clear how the RAID is
implemented.

The test you ran basically measures the response time for an I/O
request. This is a reasonable test but it's not the whole story. The
test you ran simply asks for data and waits for it to be delivered; then
it asks for some more and waits. It is quite possible that the RAID
controller being interposed actually makes this into a chained process:

1. hdparam issues a read
2. read request transferred to RAID controller
3. raid controller looks at request and issues read to a disk
4. disk responds, transferring data to RAID controller
5. RAID controller transfers data to kernel
6. kernel tells hdparam the I/O is done

You use a shorter chain without the RAID.

But what you are not seeing is how well each disk subsystem behaves
under multi-threaded load. It would not be surprising to find that the
RAID controller will handle 2x to 3x the load of a single disk when
there are multiple processes reading data.

There IS a performance penalty for doing write operations on a RAID-5
but this is not so much in the CPU power required to calculate parity
but in the extra I/O operations needed to complete the operation. A
small read is but one I/O (a read) but a small write requires 4 I/O's.
First the data to be overwritten and the parity blocks are read (2
reads). The new parity is calculated from the old parity, the old data,
and the new data all XORed together, Then the new data and new parity
are written (2 writes).





More information about the K12OSN mailing list