Re: RAID Software Experiments



On 23 Feb 2006 15:05:58 -0800, ivowel@xxxxxxxxx wrote:

My guess is that you would also get similar results with hdparm.

Possibly, in context of lkml (linux-kernel mailing list) hdparm -t
not trusted for benchmarking.

I was just surprised. I may not be the only one who
cannot double bandwidth via software RAID, though.

I did get the double speed on bulk read/write as expected, but in
real usage benchmarks, twin RAID is useless --> this for computational
heavy stuff such as kernel compiling.

A better use of two HDDs is to run data on one and OS on the other,
at least at the fast end of the drive -- I use slow end for backup
datastore.

Raw write speed of 118.6MB/s to /dev/md0 dropped to 99.4MB/s for
reiserfs filesystem, I'm happy to see data*** drive performance,
box is http://bugsplatter.mine.nu/test/boxen/sempro/

Seagate data*** says > 58MB/s (at the fast end of drive, dropping
to 28MB/s other end -- yes I've measured that too ;))

root@sempro:~# hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads: 170 MB in 3.01 seconds = 56.47 MB/sec
root@sempro:~# hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads: 170 MB in 3.02 seconds = 56.38 MB/sec
root@sempro:~# hdparm -t /dev/sdb

/dev/sdb:
Timing buffered disk reads: 170 MB in 3.03 seconds = 56.09 MB/sec
root@sempro:~# hdparm -t /dev/sdb

/dev/sdb:
Timing buffered disk reads: 170 MB in 3.00 seconds = 56.61 MB/sec

Ahh, I remember --> hdparm -t looks at fast end of disk, whereas dd can be
told precisely where to read/write.

Oops -- literally --> don't dd write zeroes to a mounted partition ;)
(forgot to umount unused /dev/sda2 it after checking content :o))

root@sempro:~# mdadm --create /dev/md0 --chunk=64 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb3
mdadm: array /dev/md0 started.
root@sempro:~# cat /proc/mdstat
Personalities : [raid0] [raid1]
md0 : active raid0 sdb3[1] sda2[0]
12337792 blocks 64k chunks

unused devices: <none>
root@sempro:~# time $(dd if=/dev/zero bs=64k count=64k of=/dev/md0; sync)
65536+0 records in
65536+0 records out

real 0m40.434s ## 106.3 MB/s
user 0m0.050s
sys 0m12.940s
root@sempro:~# hdparm -t /dev/md0

/dev/md0:
Timing buffered disk reads: 304 MB in 3.01 seconds = 101.00 MB/sec
root@sempro:~# mdadm --stop /dev/md0
root@sempro:~# time $(dd if=/dev/zero bs=64k count=64k of=/dev/sdb3; sync)
65536+0 records in
65536+0 records out

real 1m20.399s ## 53.4MB/s
user 0m0.030s
sys 0m14.550s
root@sempro:~# time $(dd if=/dev/zero bs=64k count=64k of=/dev/sda2; sync)
65536+0 records in
65536+0 records out

real 1m12.833s ## 59MB/s
user 0m0.030s
sys 0m14.630s

<restart array>

root@sempro:~# mkreiserfs /dev/md0
mkreiserfs 3.6.19 (2003 www.namesys.com)
....
ReiserFS is successfully created on /dev/md0.
root@sempro:~# mount /dev/md0 /mnt/hd/
root@sempro:~# time $(dd if=/dev/zero bs=64k count=64k of=/mnt/hd/zeroes; sync)
65536+0 records in
65536+0 records out

real 0m45.594s ## 94.2MB/s
user 0m0.050s
sys 0m16.230s

Notes:
/dev/sdb3 starts 32GB into drive, thus is on a slower region, whereas
/dev/sda2 starts 4GB in from start of drive in fastest region.

Also, use dd bs * count > RAM capacity, I'm using 4GB (2^16 * 2^16,
or 64k * 64k) dd block on a box with 1GB RAM to overwhelm RAM buffers.

Cheers,
Grant.
--
.... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
.