On 3/2/06, Jarry <[EMAIL PROTECTED]> wrote:
> Frankly, I dont understand this. Why should the write speed be so
> degraded? If you have 4 disks in raid5, and you want to write
> 1.5 GB of data, you actually write 500MB on disk1, 500MB on disk2,
> 500MB on disk3 and 500MB on disk4 (1.5 GB data + 0.5 GB parity).

If you are writing raw data to an array, you are correct.  But if you
are using a filesystem, it is the filesystem that determines where
each file block is located, while it is the RAID layer tat determines
which parity block goes with which data block.  So the 500MB of data
written to disk1 is almost certainly going to be written to a
different set of blocks than the 500MB written to disk2, which will
differ from disk3, etc.  To calculate the parity, the RAID layer will
need to know the data of the other 3 disks, so for any blocks not in
buffer cache (those that were written should be in the cache), it will
need to issue a read for those blocks.

I may have underestimated things by using the pathalogical case where
every write requires 2 reads (for the data not in cache) and 2 writes
(for the updated data and the parity), but it isn't hard to imagine
that the pathalogical case becomes the norm for a moderately
fragmented filesystem.  But the _worst_ (and best) case for RAID 0+1
is two writes.

> And because they are sata-disks, they do not share i/o channel,
> as 2 pata-disks on one cable. ytIn other words, write operations
> are parallel. There is of course some overhead caused by parity
> calculation and synchronisation, but with today's cpu it is not
> problem. I'm sure with 4 todays equal sata disks read/write speed
> of raid5-array would be much higher...

It is PCI (or PCIe) bandwidth that will be the limiting factor...

> > either RAID1 set, so you should easily be able to saturate the bus
> > bandwidth at 132MB/s.
>
> Nope. Today disks controllers are not attached to southbridge
> through pci, but rather through a few pci-express lines - 2, 4, or
> even more, depending on mobo configuration. For example nForce4 has
> 20 pci-express flexible lines, it means mobo-producers can use them
> as they want, but most cheap boards have 2pci-express lines
> assigned to sata disk controller).

My <4mo old nforce4 motherboard with a SATA chipset and RAID0 array
maxes out at 128MB/s throughput.  I am quite certain that only a
single PCIe lane is being used for the SATA controller there, as each
disk runs at ~80MB/s.  I've seen some reports of 160MB/s to SATA
disks, but that was using a hardware RAID controller, in RAID0, and
10000rpm drives.

What MB are you using that allows you to get 500MB/s throughput to your disks?

-Richard

-- 
gentoo-user@gentoo.org mailing list

Reply via email to