Re: HELP: Getting unexpected fakeraid behavior. Fix?

From: Arjan van de Ven
Date: Sun Jul 06 2008 - 16:19:45 EST


On Sun, 6 Jul 2008 16:07:14 -0400
"Timothy Normand Miller" <theosib@xxxxxxxxx> wrote:

Him

> - So since fakeraid, as far as Linux is concerned, is just software
> RAID, behavior and performance of fakeraid (dm) and software RAID (md)
> should be identical (via the same drive controller).

there's a few minor nits on this concerning disk layout for non-RAID1;
for RAID1 they should be equivalent.

>
> Since RAID1 is a mirrored configuration, it's possible to distribute
> reads across the drives, improving throughput and latency over a
> single drive on random reads.

This is.. borderline true. Let me explain the caveats;
for a SINGLE THREADED workload, there is actually no difference.
Balancing long sequential reads over the 2 disks isn't such a good idea
for that case, since it just introduces seeks rather than keep up with
the streaming speed.
Balancing seeks; there might be some theoretical advantage because you
could, again in theory, do shorter seeks if you keep one head at the
inside and one the other disk head on the outside. In practice... a lot
of the seek time is rotational latency so it's not as big a deal as it
may sound; the moment you seek you pay a ton.


>
> I have written a program that, on start up, reads through thousands of
> small files, and as a result does a great deal of random reads for
> several minutes. While that was going on, I ran "iostat -d 2". My
> observation was that any writes that occurred were correctly sent to
> both disks, but all reads were being requested ONLY from the first
> drive.

if your application is single threaded this isn't totally unexpected as
a result...



--
If you want to reach me at my work email, use arjan@xxxxxxxxxxxxxxx
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/