Wednesday, August 13, 2008

Linux RAID0 (striped) Performance

As I continue with the process of reoganizing my virtualization servers, I ran a quick test on my drives in my other Xen box. Originally, I had /home on a RAID1, but wanted to see if I could truly get a boost out of a RAID0. Three tests: an LVM volume on a single disk, a RAID1 mirrored across two disks, the same two partitions in a striped RAID 0:
[root@baltar xen]# hdparm -Tt /dev/vg0/test /dev/md0
/dev/vog0/home:
  Timing cached reads: 416 MB in 2.01 seconds = 207.25 MB/sec
  Timing buffered disk reads: 28 MB in 3.09 seconds = 9.05 MB/sec
/dev/md0:
  Timing cached reads: 416 MB in 2.02 seconds = 206.40 MB/sec
  Timing buffered disk reads: 32 MB in 3.05 seconds = 10.50 MB/sec
Notice the buffered speeds are very close. This is because the LVM is on /dev/hda, as is the first element of the RAID1. (These are old disks on an old Celeron CPU.)

Now we rebuild the same two partitions into a RAID0. The disks are on separate controllers (/dev/hda and /dev/hdc) so we expect a boost in throughput:
[root@baltar xen]# hdparm -Tt /dev/md0
/dev/md0:
  Timing cached reads: 416 MB in 2.00 seconds = 207.91 MB/sec
  Timing buffered disk reads: 68 MB in 3.05 seconds = 22.30 MB/sec
Yeow! Look at those numbers: better than double.

I'm convinced.

No comments:

Post a Comment