Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yet another "my software RAID is slow" thread
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Jarjar
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 265
Location: Sweden

PostPosted: Fri May 23, 2008 10:00 am    Post subject: Yet another "my software RAID is slow" thread Reply with quote

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
View user's profile Send private message
gentoo-dev
Apprentice
Apprentice


Joined: 24 Jan 2006
Posts: 172

PostPosted: Fri May 23, 2008 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Jarjar
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 265
Location: Sweden

PostPosted: Fri May 23, 2008 10:59 am    Post subject: Reply with quote

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
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Fri May 23, 2008 1:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Sun May 25, 2008 6:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum