View previous topic :: View next topic |
Author |
Message |
Jarjar Apprentice
Joined: 21 Jul 2002 Posts: 265 Location: Sweden
|
Posted: Fri May 23, 2008 10:00 am Post subject: Yet another "my software RAID is slow" thread |
|
|
My RAID arrays are slow. I'm mostly worried about a 3-disk RAID5 one, but I have a 2-disk RAID1 one that isn't blazing either... This thread will mostly be about the RAID5 one, though.
Some info:
Code: |
exscape ~ # uname -a
Linux exscape.org 2.6.23-gentoo-r8 #6 Sun Mar 16 20:19:48 CET 2008 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
exscape ~ # mdadm -D /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Sat Sep 8 20:56:43 2007
Raid Level : raid5
Array Size : 390620160 (372.52 GiB 400.00 GB)
Used Dev Size : 195310080 (186.26 GiB 200.00 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Fri May 23 11:53:09 2008
State : active
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 128K
UUID : 21320d71:d542469f:9bb7995a:b315fd78
Events : 0.2433
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 3 65 1 active sync /dev/hdb1
2 22 1 2 active sync /dev/hdc1
exscape ~ # hdparm -t /dev/sda ; hdparm -t /dev/hdb ; hdparm -t /dev/hdc
/dev/sda:
Timing buffered disk reads: 198 MB in 3.02 seconds = 65.57 MB/sec
/dev/hdb:
Timing buffered disk reads: 146 MB in 3.01 seconds = 48.45 MB/sec
/dev/hdc:
Timing buffered disk reads: 188 MB in 3.02 seconds = 62.20 MB/sec
exscape ~ # hdparm -t /dev/md0
/dev/md0:
Timing buffered disk reads: 176 MB in 3.00 seconds = 58.60 MB/sec
# dd if=big.file of=/dev/null
1432964+0 records in
1432964+0 records out
733677568 bytes (734 MB) copied, 12.8018 s, 57.3 MB/s
|
Any ideas? More info?
Most posts I've seen on the subject, except others who want more speed, claim 100+ MB/s read speeds.
I've tried changing readahead (hdparm -a) for the disks, it mostly made it slower. Same deal with blockdev --setra /dev/md0.
The CPU should be more than enough (see sig), and the controller/s as well, I guess. _________________ [Server etc. | C2D 2.2 @ 3.0 GHz / 4 GB RAM / 3x1 TB + 1x2 TB SATA disks + 1.5 TB ext. | Gentoo]
[Laptop | Macbook Pro 15" / Core i7 (Sandy) Quad 2.2 GHz / 16 GB RAM / Samsung 840 250 GB SSD + 1 TB + 2 TB HDD / 6750M 1 GB / OS X, Win 7] |
|
Back to top |
|
|
gentoo-dev Apprentice
Joined: 24 Jan 2006 Posts: 172
|
Posted: Fri May 23, 2008 10:54 am Post subject: |
|
|
Those figures look normal.
Raid-1 is not about performance, it's about safety. Writes are done in parallel, reads are not spread.
3-disk Raid-5 is the worst you can do. You need at least 4 disks for decent perfs. |
|
Back to top |
|
|
Jarjar Apprentice
Joined: 21 Jul 2002 Posts: 265 Location: Sweden
|
Posted: Fri May 23, 2008 10:59 am Post subject: |
|
|
Hm, OK then.
Re: RAID 1, people claim it offers a slight read speed advantage, but
hda: 34.5MB/s
sda: 65.8MB/s
RAID1 of hda + sda: 37MB/s _________________ [Server etc. | C2D 2.2 @ 3.0 GHz / 4 GB RAM / 3x1 TB + 1x2 TB SATA disks + 1.5 TB ext. | Gentoo]
[Laptop | Macbook Pro 15" / Core i7 (Sandy) Quad 2.2 GHz / 16 GB RAM / Samsung 840 250 GB SSD + 1 TB + 2 TB HDD / 6750M 1 GB / OS X, Win 7] |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Fri May 23, 2008 1:09 pm Post subject: |
|
|
My numbers are different for 2 drives in raid1 :
Code: | localhost ~ # hdparm -t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 36 MB in 3.17 seconds = 11.35 MB/sec
localhost ~ # hdparm -t /dev/sdb1
/dev/sdb1:
Timing buffered disk reads: 50 MB in 3.27 seconds = 15.27 MB/sec
localhost ~ # hdparm -t /dev/md1
/dev/md1:
Timing buffered disk reads: 64 MB in 3.03 seconds = 21.13 MB/sec |
The drives sda1 and sdb1 are really old IDE drives plugged into a really old Promise card using libata, so they show as scsi.
I saw one other study of raid1 that seemed to indicate that for single-stream reads it looked like they would auto-stripe, and for multitasking reads the elevator optimization would send the 2 drives off onto different threads, giving better overall performance than raid0. I did no real benchmarking, so I can't confirm that, but my numbers are not inconsistent with that, either. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
thechris Veteran
Joined: 12 Oct 2003 Posts: 1203
|
Posted: Sun May 25, 2008 6:22 am Post subject: |
|
|
I tried SW raid on a PCI card once and was VERY dissappointed. 64KB/s write speeds. yes, KB/s, not MB/s. moving to a PCIe mobo with enough SATA ports onboard helped out a lot in that case. _________________ HW problems. It's a VIA thing. |
|
Back to top |
|
|
|