mdadm lvm and ext4 slowness - How can I speed it up?

Posted by beatbreaker on Server Fault See other posts from Server Fault or by beatbreaker
Published on 2010-11-06T13:07:14Z Indexed on 2011/01/11 13:55 UTC
Read the original article Hit count: 157

Filed under:
|
|
|
|

I can't figure out why I'm getting such terrible times out of my mdadm and in particular the lvm partitions in it.

I made the raid:

mdadm --create --verbose /dev/md0 --level=5 --chunk=1024 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1

# cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md0 : active raid5 sda1[0] sdd1[3] sdc1[2] sdb1[1]
2930279424 blocks level 5, 1024k chunk, algorithm 2 [4/4] [UUUU]

I then created the physical volume, volume group, and logical volumes, I then formatted the logical volumes to ext4 using the following commands I got from here: http://busybox.net/~aldot/mkfs_stride.html

mkfs.ext3 -b 4096 -E stride=256,stripe-width=768 /dev/datavg/blah

Now I'm confused, I had these lvs running real quick before in mdadm but now that I've 'optimized' everything it's slower, eg, before:

/dev/datavg/lv_audio:
Timing buffered disk reads: 598 MB in 3.01 seconds = 198.85 MB/sec

but now after:

/dev/datavg/audio:
Timing buffered disk reads:  198 MB in  3.00 seconds =  65.96 MB/sec

That's pitiful! What's happened here? Did I not follow the instructions correctly? Can i reshape the ext4 partitons to default back to what they were? (I used defaults before and they were fine!)

© Server Fault or respective owner

Related posts about raid

Related posts about partition