Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jun 2005 01:00:09 -0700
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Sandy Rutherford" <sandy@krvarr.bc.ca>, "Alex Zbyslaw" <xfb52@dial.pipex.com>
Cc:        freebsd-questions@freebsd.org
Subject:   RE: Yet another RAID Question (YARQ)
Message-ID:  <LOBBIFDAGNMAMLGJJCKNMEMHFBAA.tedm@toybox.placo.com>
In-Reply-To: <17080.48071.705585.35147@szamoca.krvarr.bc.ca>

next in thread | previous in thread | raw e-mail | index | archive | help


>-----Original Message-----
>From: owner-freebsd-questions@freebsd.org
>[mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Sandy
>Rutherford
>Sent: Tuesday, June 21, 2005 6:16 PM
>To: Alex Zbyslaw
>Cc: freebsd-questions@freebsd.org; Ted Mittelstaedt
>Subject: Re: Yet another RAID Question (YARQ)
>
>
>>>>>> On Mon, 20 Jun 2005 11:36:32 +0100,
>>>>>> Alex Zbyslaw <xfb52@dial.pipex.com> said:
>
> > Ted Mittelstaedt wrote:
> >>> Sandy
> >>> Rutherford
> >>> Sent: Sunday, June 19, 2005 10:52 PM
> >>>
> >>>
> >>> In order to boost read performance, a RAID card should interleave
> >>> reading from a RAID-1 volume by reading alternately from
>one drive and
> >>> then the other.  You can see this in alternate blinking of the
> >>> activity lights of the drives.  If you are not seeing this when
> >>> copying a large file, then this would suggest that a
>RAID-1 volume is
> >>> not working as it should.
> >>>
> >>>
> >>>
> >>
> >> Incorrect.  What you are describing is RAID-0.  RAID-1 is mirroring.
> >> Here's
> >>
> >>
> > I don't think you read the message correctly.  It said that
>*reads* were
> > interleaved not that the *data* was interleaved.
>
>That's exactly what I said.  Thanks.
>
>Ted, I am aware that RAID 1 is mirroring.  However, any proper
>implementation of RAID 1 should also boost read performance and if
>during a read you are not seeing activity on both drives in the RAID 1
>volume, then I would say this is a good indication that something is
>wrong.
>

OK, I didn't bother replying earlier but now your both chiming in so
I'll kill 2 birds with one stone I guess.

First of all you didn't say

"seeing activity on both drives in the RAID 1 volume"

It's a cute attempt at a save on your part, but it is not what
I said was wrong with your statement.

You actually said:

"a RAID card should interleave
reading from a RAID-1 volume by reading alternately from one drive and
then the other.  You can see this in alternate blinking of the
activity lights of the drives."

I said that is incorrect with RAID-1 because it is.  And I will
explain why.

With a RAID-1 card, mirroring, there are 2 ways to setup reads.
The first way makes the assumption that you are mirroring purely
for fault tolerance.  In that case you would NOT see a ANY read from
the second disk.  The reason is that every time you read you move the
heads, and the more head movement the quicker the disk wears out.

Placing exactly the same amount of head movement on both disks
means that if you setup a mirror with new disks of the same model,
which is pretty much how most people do it, the MTBF on both disks
is the same, and if you put equal activity on both disks your making
a very good chance that they will fail at the same time, or very close
to the same time.

Thus, for an optimal fault tolerance you would favor the first disk.
You cannot do that with writes into a mirror, of course, since both
drives must be updated.  But you can do it with reads - you just read
only from the first disk.  Thus the first disk will most likely fail
first,
and the second disk will most likely not fail very close to the time that
the first one fails.  Thus the admin has maximum time to get a
replacement
disk in there.

So much for the first way.

The second way on a mirror is to try to setup reads to enhance speed
in addition to fault tolerance.

With this setup you interleave reads.  You read a few blocks from the
first disk, then a few blocks from the second, then a few blocks
from the first, etc. etc.

However, the kicker is that you do this AT THE SAME TIME.  The disk heads
are both continuiously reading, because the read speed of the heads
are so much slower than the time it takes to move the data out of the
drive and into main memory, that each disk is 'running dry' so fast
that by alternating the read, your giving the drive a chance to catch
up.  So there is never a time the head isn't either reading or seeking
for
the next read, thus the disk drive lights are going to be both on
solid at the same time.  They will not be "alternate blinking"  Indeed,
if
they really are alternating back and forth, then your read throughput
will be no higher than a continuious read from a single disk.

The ONLY time your going to see "alternate blinking" on a read is
in a stripe set, RAID-0.

Ted




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?LOBBIFDAGNMAMLGJJCKNMEMHFBAA.tedm>