Re: RAID 1 with IDE HDD
From: Floyd L. Davidson (floyd_at_barrow.com)
Date: 04/05/05
- Next message: John-Paul Stewart: "Re: MS Access 'equiv' for Linux?"
- Previous message: noi: "Re: Redirecting Standard Output to a Variable"
- In reply to: Sandeep: "RAID 1 with IDE HDD"
- Next in thread: Douglas O'Neal: "Re: RAID 1 with IDE HDD"
- Reply: Douglas O'Neal: "Re: RAID 1 with IDE HDD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 05 Apr 2005 10:13:58 -0800
sandeepagarwal.1980@gmail.com (Sandeep) wrote:
>hello all,
>
>i am new to the RAID installation and functioning. I have just
>configured RAID1 on my Redhat linux 8.0 machine. I am on a Intel 845
>motherboad with 2GB of RAM and have used 2 160 GB IDE.
>
>Both the HDD are connected to the same IDE cable as master and salve.
>but after reading the following information at
>http://www.linuxhomenetworking.com/linux-adv/raid.htm i think i
>misconfigured the RAID installation
Depends on what you expect RAID to accomplish for you; and since you
haven't stated what that is, it's a bit difficult to tell if you've
got what you wanted or not. (I'll assume that you want I/O speed,
or you would have used a RAID-0 array instead.)
>"The failure of one drive on an IDE bus often causes the
>malfunctioning of the second device. This can be fatal if you have two
>IDE drives of the same RAID set attached to the same cable."
... [two /etc/raidtab file examples snipped]
I don't see the above as having even a small significance,
simply because with a RAID-1 array of two IDE drives a failure
of either drive simply *loses* all of the data, period. No
data can be recovered from the second disk anyway.
RAID-0 increases fault tolerance. RAID-1 increase performance.
Each at the expense of the other. RAID-5, which requires at
least 3 drives, combines both (at the expense of storage space,
because the added space of the last drive is not used for data).
A RAID-1 array performs striping (splitting writes between both
drives simultaneously), making it faster under most
circumstances. It will not be faster if the bandwidth of either
the IDE bus or the PCI bus is reached, nor if the disks cannot
be written to at the same time. Using separate controllers
might make a slight improvement for a two IDE drive RAID-1 array
(using modern controllers and drives)... or maybe not.
Whether having the two disks on separate controllers makes any
difference depends on the drives and the controllers.
Particularly on older controllers, and maybe even some newer
ones, it probably makes at least a small difference. (I just
set up a similar system over the weekend, and put the two IDE
drives on different controllers. I didn't measure the
difference and just assumed I'd be better that way, but given
the results, I doubt it would be different.)
Whether it is worth the effort to redo your configuration is
very questionable, and you can probably determine positively if
it is or not! ... if you did it right. (And if you didn't,
you'll want to redo it anyway, and you can then switch the
second drive to the secondary IDE controller.)
A few points... You'll find it difficult to boot from a kernel
image stored on a RAID array, and there is no advantage to doing
so. Hence you want a small partition for /boot that is not used
for a RAID array. Likewise there is no point at all in using
swap on a RAID array, so you'll want to have identical swap
partitions on each drive (set them up with equal priority, and
your swap speed will almost double).
The boot partition should be the first partition on your disk,
and perhaps the swap partitions should be the last (that is, on
the slowest part of the disk). Everything in between can be
divided into one or more partitions for RAID arrays.
If you don't have something like that... rebuild the entire
system.
If you do have it partitioned that way... try an experiment.
On the last partition (highest numbered, so it will also be
the slowest) used for a RAID array (/dev/md0 using /dev/hda3
and /dev/hdb3 on your system, run this:
hdparm -tT /dev/md0; hdparm -tT /dev/hda3; hdparm -tT /dev/hdb3
Repeat it maybe 3 or 4 times to get an idea what the average
speeds are.
If the RAID array shows a speed increase of more than say 50%,
there is no point in redoing anything, because you'll gain some,
but not much. The most you could expect would be close to a 100%
speed increase (but only with slow drives).
Judging from my experience, if you have anything but the latest
hardware (something with an improved PCI bus), the maximum speed
will be just over 30 MB/sec. Anything approaching that is
probably bandwidth limited by the PCI bus, and hence no configuration
change will affect it.
I have three boxes with RAID arrays. All are dual cpu systems,
but with a range of cpu's and disk drives. The oldest has 533
Mhz Celerons with four 18 Gb SCSI drives on a single controller;
the next has AMD Athlon 1600+ cpu's with four 9 Gb SCSI drives
on two controllers, and the newest has AMD Athlon 2400+ cpu's
with two 40 Gb IDE drives on two controllers.
As you would expect, the raw disk partition speeds and the
cached reads are all progressively faster with the newer,
faster, machines:
Machine 1 (dual 533 Mhz Celeron on a ASUS P2B-DS):
Timing buffer-cache reads: 128 MB in 1.45 seconds = 88.29 MB/sec
Timing buffered disk reads: 64 MB in 5.72 seconds = 11.18 MB/sec
Machine 2 (dual AMD Athlon 1600+ on a Tyan S2462UNG):
Timing buffer-cache reads: 128 MB in 0.57 seconds =223.03 MB/sec
Timing buffered disk reads: 64 MB in 3.96 seconds = 16.18 MB/sec
Machine 3 (dual AMD Athlon 2400+ on a Tyan S2462UNG):
Timing cached reads: 996 MB in 2.00 seconds = 497.83 MB/sec
Timing buffered disk reads: 58 MB in 3.07 seconds = 18.91 MB/sec
Pretty much as expected... but here are the numbers for the RAID
arrays:
Machine 1:
Timing buffered disk reads: 64 MB in 2.05 seconds = 31.16 MB/sec
Machine 2:
Timing buffered disk reads: 64 MB in 2.02 seconds = 31.69 MB/sec
Machine 3:
Timing buffered disk reads: 96 MB in 3.05 seconds = 31.44 MB/sec
My interpretation is that the RAID arrays are hitting the
maximum bandwidth of the PCI bus, hence the speed on all three
machines has the same limit.
There is no point in tweaking any of these three systems for
better performance. If there were, I'd put the fastest SCSI
drives on the fastest cpu's, and split them between the two SCSI
controllers to get one really fast machine. Instead, I have the
fastest SCSI drives on the slowest cpu and all on one
controller. (They show up as the slowest on the raw disk reads
only because of the slow cpu's. When measured on the same cpu,
the 18 Gb SCSI drives are slightly faster than the 40 Gb hard
drives.)
The point is that if you run hdparm on your RAID array and get
anything close to 30 MB/sec, you'll want to think twice about
whether it is worth any effort at all to reconfigure. Of
course, if you get 20 MB/sec... you might want to.
If you have newer hardware with more bus bandwidth, you'll have
to find other examples of what it might peak at in order to
judge how much you might gain from optimizing your configuration.
-- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com
- Next message: John-Paul Stewart: "Re: MS Access 'equiv' for Linux?"
- Previous message: noi: "Re: Redirecting Standard Output to a Variable"
- In reply to: Sandeep: "RAID 1 with IDE HDD"
- Next in thread: Douglas O'Neal: "Re: RAID 1 with IDE HDD"
- Reply: Douglas O'Neal: "Re: RAID 1 with IDE HDD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|