I have a need for some large storage space on the cheap, so I bought 4
40gb drives and hooked them up to a linux box running RedHat 6.1. Of
course, I needed to upgrade the kernel to 2.2.14 to deal with the large
drive size, and then needed to use the new patches from Ingo Molnar to
get the raid working again.
The box boots and runs from a pair of SCSI drives so the IDE is totally
dedicated to the RAID.
For this application, space is more important that hard drive failures,
so I've configured it as one large raid0 array, giving me a 160Gb.
I'm about ready to start laying the data down, and so I've looked for
things that I can do to improve the speed of writing and reading from the
drives. Now being as how IDE is two chains, I didn't expect a huge
performance gain, because there would be some competition between the
master and slave on each chain.
Here are the performance stats using hdparm (and I humbly admit that I don't
even know if this is the right way to determine these, of if I'm being a
fool)
# hdparm -t /dev/sda /dev/sdb /dev/hda /dev/md0
: /dev/sda:
: Timing buffered disk reads: 64 MB in 5.04 seconds =12.70 MB/sec
: /dev/sdb:
: Timing buffered disk reads: 64 MB in 4.49 seconds =14.25 MB/sec
This sounds reasonable, and matches SCSI on a similar system next to it.
: /dev/hda:
: Timing buffered disk reads: 64 MB in 2.67 seconds =23.97 MB/sec
This perforamce was suprising. Both of the SCSI disks are of recent
manufacturer and name brand. Seeing the IDE beating the SCSI makes me
wonder if I'm doing something wrong.
: /dev/md0:
: Timing buffered disk reads: 64 MB in 3.05 seconds =20.98 MB/sec
This is the puzzling one. The raid actually performs slower than any
single drive. I've run this test several times, and it's always right
around 21MB/sec. The raw drive is around 24MB/sec. I've configured the
listing of the drives in raidtab to be master-master-slave-slave in the
hopes that the order might make a difference.
I might expect this level of performane if it was mirroing, but in this
case it should be stripping across multiple drives, and able to write to
one while the other is finishing up.
: Personalities : [raid0]
: read_ahead 1024 sectors
: md0 : active raid0 hdd[3] hdb[2] hdc[1] hda[0] 160082176 blocks 8k chunks
: unused devices: <none>
The number for the raid is similar to the performace for a raid on three
SCSI drives on the machine next to it.
Finally, since I'm still using ext2, I'm not able to have any file over
2Gig, so I've allready had to code my app to divide the data into 2 gig
chunks. I could just manually do this and move them between the hard
drives and soft-link them. By doing so I would actually get better
performace with a small loss of drive space.
Can anyone see what I'm doing wrong, or is this as good as it gets?