Re: Software RAID0 behaviour/performance on ATA drives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday March 25, andy@xxxxxxxxxx wrote:
> The recommended setup for doing RAID0 with ATA drives is
> that each hard drive should be on its own IDE channel.  The
> reasoning is so they can operate concurrently... i.e.  if you
> put them in a master-slave configuration on the same channel,
> you lose the benefits of striping since both drives cannot
> use the channel at the same time and have to wait for the
> others' read/write to finish first.
> 
> QUESTION:  Is this really accurate?  Is the md driver smart/multi-threaded
> enough to read/write ahead non-consecutive sectors simultaneously?
> When writing, for example, the 1st to 4th chunks of a file across
> a striped two-drive array, would it write the 2nd and 4th
> chunks on one drive without waiting for the 1st and 3rd chunks
> to finish writing on the other?
> 
> If it can't, and the writes have to proceed in sequence/lockstep,
> how can putting the striped drives on separate channels help?

The raid0 driver is 'clever' at all.
It is given requests by the filesystem or mm subsystem, maps them to
the correct device/sector, and sends them straight on to the
appropriate driver.  It never waits for requests, just maps and
forwards.

So if the  filesystem sends 128 4k read-ahead requests to the raid0
driver it will forward each one to the relevant device and, depending
on chunk size etc, you might get, say, 32 4K requests sent to each of
4 drives.  The drives would (depending on the internals of the driver)
processes all these requests in parallel.

In your example, if the filesystem or mm subsystem submitted writes
for 4 consecutive chunks on a two-drive raid0 array without waiting
for earlier ones to complete before submitting later ones, then they
would all get to the device driver in a timely fashion, and the device
driver(s) should be able to drive the two drives in parallel.

So if the writer handles the required parallelism, and the devices
handle the required parallelism, then the raid0 layer won't interfere
at all. 

Hope that makes it clear.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux