View previous topic :: View next topic |
Author |
Message |
DrAgOnTuX Apprentice


Joined: 22 Aug 2006 Posts: 176 Location: Switzerland
|
Posted: Tue Jan 18, 2011 10:52 pm Post subject: mdadm raid 5 faster than raid 0 !? |
|
|
Hi, folks!
I recently upgraded my fileserver and decided to append a raid 0 at the end of the disks by cutting of some gigabytes from the raid 5 partitions.
So now I have following partition table on each of my six 1.5 TB sata drives:
Code: |
# fdisk -l /dev/sda
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5041c296
Device Boot Start End Blocks Id System
/dev/sda1 * 1 9 72261 fd Linux raid autodetect
/dev/sda2 10 75 530145 82 Linux swap / Solaris
/dev/sda3 76 1381 10490445 fd Linux raid autodetect
/dev/sda4 1382 182401 1454043150 5 Extended
/dev/sda5 1382 173282 1380794751 fd Linux raid autodetect
/dev/sda6 173283 182401 73248336 fd Linux raid autodetect
|
and following raid configuration:
Code: |
# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [raid0]
md6 : active raid0 sdf6[5] sde6[4] sdd6[3] sdc6[2] sdb6[1] sda6[0]
439483392 blocks super 1.2 512k chunks
md1 : active raid1 sdf3[4] sde3[5] sdd3[3] sdc3[2] sdb3[1] sda3[0]
10490368 blocks [6/6] [UUUUUU]
md4 : active raid5 sdb5[1] sdf5[4] sde5[5] sdd5[3] sda5[0] sdc5[2]
6903973120 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
md0 : active raid1 sdf1[4] sde1[5] sdd1[3] sdc1[2] sdb1[1] sda1[0]
72192 blocks [6/6] [UUUUUU]
|
All is set up and working, now I test read performance with hdparm:
Code: |
# hdparm -tT /dev/md[46]
/dev/md4:
Timing cached reads: 12880 MB in 2.00 seconds = 6446.53 MB/sec
Timing buffered disk reads: 1514 MB in 3.01 seconds = 503.82 MB/sec
/dev/md6:
Timing cached reads: 12318 MB in 2.00 seconds = 6165.40 MB/sec
Timing buffered disk reads: 632 MB in 3.01 seconds = 209.65 MB/sec
|
what the ..?!
how can a raid 5 be ~2.5x faster than a raid 0, I've never seen that before.
Kernel is 2.6.36-gentoo-r5 x86_64
System is an Intel Quad Q9450 with 8 GB of DDR2 RAM and an Intel ICH9 six port SATA Controller
I already tested with different chunk sizes for raid 0, fastest read was ~330 MB/sec, still slower than the raid 5 array.
Any help is welcome! Thanks in advance! |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55015 Location: 56N 3W
|
Posted: Tue Jan 18, 2011 11:07 pm Post subject: |
|
|
DrAgOnTuX,
Your raid0 is located on the slowest part of the drive. Drives are 'zoned' as you get nearer the spindle, the zones have less sectors per track, so each revolution of the drive reads less data. You also need more head movement, which is a very slow activity.
To compare like with like, you need to remake the raid0 as raid5, so you test in the same place on the drive. ~2.5x seems a lot but hdparm is not a good speed test tool. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
DrAgOnTuX Apprentice


Joined: 22 Aug 2006 Posts: 176 Location: Switzerland
|
Posted: Tue Jan 18, 2011 11:49 pm Post subject: |
|
|
Argh.. I simply worked too long with SSDs so I've forgot about the spindles
You're absolutely right:
Code: |
# hdparm -tT /dev/sda{,[356]}
/dev/sda:
Timing cached reads: 12154 MB in 2.00 seconds = 6082.83 MB/sec
Timing buffered disk reads: 368 MB in 3.01 seconds = 122.36 MB/sec
/dev/sda3:
Timing cached reads: 12390 MB in 2.00 seconds = 6201.63 MB/sec
Timing buffered disk reads: 368 MB in 3.02 seconds = 122.05 MB/sec
/dev/sda5:
Timing cached reads: 12508 MB in 2.00 seconds = 6260.85 MB/sec
Timing buffered disk reads: 364 MB in 3.02 seconds = 120.70 MB/sec
/dev/sda6:
Timing cached reads: 11242 MB in 2.00 seconds = 5625.96 MB/sec
Timing buffered disk reads: 188 MB in 3.00 seconds = 62.56 MB/sec
|
So the only way to get a fast raid 0 and a secure raid 5 is to switch the partition layout? oh no, not once again.. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55015 Location: 56N 3W
|
Posted: Tue Jan 18, 2011 11:52 pm Post subject: |
|
|
DrAgOnTuX,
hdparm indicates the sequential read speed - thats mot very real world.
Try bonnie. You will like some of the answers and hate others. You still have to choose your real world from all the numbers bonnie gives you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
DrAgOnTuX Apprentice


Joined: 22 Aug 2006 Posts: 176 Location: Switzerland
|
Posted: Wed Jan 19, 2011 12:21 am Post subject: |
|
|
I will definitly take a look at bonnie++
thanks a lot! |
|
Back to top |
|
 |
|