System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

raid10 is slow - or am I missing ?

 
Maaz
Valued Contributor

raid10 is slow - or am I missing ?

raid10 is faster. but in my case its slower.
please help me, what I am doing wrong.

/dev/md0 is raid1 consist upon sda7, and sda8.
/dev/md1 is raid1 consist upon sda9, and sda10.

/dev/md2 is raid0 consist upon md0, and md1.


# mdadm --create /dev/md2 --chunk=64 --level=0 --raid-devices=2 /dev/md[01]

# cat /proc/mdstat
Personalities : [raid1] [raid0]
md2 : active raid0 md1[1] md0[0]
626176 blocks 64k chunks

md1 : active raid1 sda10[1] sda9[0]
313152 blocks [2/2] [UU]

md0 : active raid1 sda8[1] sda7[0]
313152 blocks [2/2] [UU]

unused devices:

performed the following test that proves that RAID10 is slower.

md2 is raid10
# hdparm -t /dev/md2

/dev/md2:
Timing buffered disk reads: 86 MB in 3.07 seconds = 27.97 MB/sec

md0 and md1 are raid1
# hdparm -t /dev/md0

/dev/md0:
Timing buffered disk reads: 180 MB in 3.00 seconds = 59.95 MB/sec

please help/suggest.
Regards
needee
7 REPLIES
Maaz
Valued Contributor

Re: raid10 is slow - or am I missing ?

and one more thing...
RAID10 is two or more raid1 devices(md0,md1) in a raid1 device(md2)
thats why I did the following.
# mdadm --create /dev/md2 --chunk=64 --level=0 --raid-devices=2 /dev/md0 /dev/md1

and I think I have followed the proper definition.

"RAID-10 can be implemented as a stripe of RAID-1 pairs. For example, given 6 devices, you may configure them as three RAID-1s A, B and C, and then configure a RAID-0 of ABC."
source: http://strugglers.net/wiki/Linux_RAID_best_practices

but I found the following command

# mdadm -v --create /dev/md0 --level=raid10 --chunk=8 --raid-devices=7 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1

at http://www.experts-exchange.com/OS/Linux/Q_24089444.html

i.e instead of creating two or more raid1 devices(md), and then creating 'raid0' on top of two or more raid1.. in above command they created the 'raid10' directly on sd devices...

whats that ?
please suggest/help
Rob Leadbeater
Honored Contributor

Re: raid10 is slow - or am I missing ?

Hi,

That might be due to the underlying storage... What are the various /dev/sdx devices ?

Cheers,

Rob
Maaz
Valued Contributor

Re: raid10 is slow - or am I missing ?

Hi Rob,
>That might be due to the underlying storage
same devices are giving better results when in raid1, but performing slow when under raid10.

>What are the various /dev/sdx devices ?
sata disk.
its a desktop class machine(just for testing).

Vitaly Karasik_1
Honored Contributor

Re: raid10 is slow - or am I missing ?

interesting...

May be it's related to record size which hdparm uses? I mean - when record size is small, system doens't strip it.
And probably it's a real problem - see this http://www.linuxquestions.org/questions/linux-software-2/poor-raid-0-performance.-mdadm-sata-centos-5-698706/

See also this article http://www.linux-mag.com/id/7582/1/; unfortunately, they don't compare RAID0 vs physical disk.
Steven E. Protter
Exalted Contributor

Re: raid10 is slow - or am I missing ?

Shalom,

I think you should run dd read tests on each device in the underlying storage.

Then you should consider changing the configuration to straight raid 1 and see if it improves performance.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Court Campbell
Honored Contributor

Re: raid10 is slow - or am I missing ?

If I am looking at this correctly, it looks as if you are using 4 partitions on a single disk. Please let me know if I am wrong, but if so, what's the point?
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Vitaly Karasik_1
Honored Contributor

Re: raid10 is slow - or am I missing ?

oops! it's pretty trivial and
kudos to Court - he was first who found explanation!