Re: RAID-5 streaming read performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ming Zhang <mingz@xxxxxxxxxxx> writes:

> then can u test RAID0 a bit? That is easier to analyze.

I can't easily test RAID-0 with my set-up, but I can test RAID-1
with two partitions.  I found that the read speed from the md
device was about the same as the read speed from each partition.
This was with readahead set to 4096 on the md device, so I had
hoped that it would do better.  Based on the output of iostat,
it looks like the reads were shared roughly equally between the
two partitions (53%/47%).  Does the RAID-1 code try to take
the first stripe from disk 1, the second from disk 2, alternately?
Or is it clever enough to try to take the first dozen from disk 1,
the next dozen from disk 2, etc, in order to get larger, contiguous
reads? 

It's less clear to me that RAID-1 with two drives will be able to
overcome the overhead of skipping various blocks.  But it seems
like RAID-5 with four drives should be able to saturate my
bus/controller.  For example, RAID-5 could just do sequential
reads from 3 of the 4 drives, and use the parity chunks it
reads to reconstruct the data chunks from the fourth drive.
If I do parallel reads from 3 of my 4 disks, I can still get
106MB/s.

Dan

PS: Here's my simple test script, cleaned up a bit:

#!/bin/sh

# Devices to test for speed, and megabytes to read.
MDDEV=/dev/md2
MDMB=300
RAWDEVS="/dev/sda7 /dev/sdb5 /dev/sdc5 /dev/sdd5"
RAWMB=300

# Device to read to clear cache, and amount in megabytes.
CACHEDEV=/dev/sda8
CACHEMB=900

clearcache () {
  echo "Clearing cache..."
  dd if=$CACHEDEV of=/dev/null bs=1M count=$CACHEMB > /dev/null 2>&1
}

testdev () {
  echo "Read test from $1..." 
  dd if=$1 of=/dev/null bs=1M count=$2 2>&1 | grep bytes/sec
  echo 
}

clearcache
for f in $RAWDEVS ; do 
  testdev $f $RAWMB
done

clearcache
testdev $MDDEV $MDMB

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux