On Fri, Jun 21, 2013 at 10:57 AM, Rich Freeman <ri...@gentoo.org> wrote: > On Fri, Jun 21, 2013 at 1:40 PM, Mark Knecht <markkne...@gmail.com> wrote: >> One place where I wanted to double check your thinking. My thought >> is that a RAID1 will _NEVER_ outperform the hdparm -tT read speeds as >> it has to read from three drives and make sure they are all good >> before returning data to the user. > > That isn't correct. In theory it could be done that way, but every > raid1 implementation I've heard of makes writes to all drives > (obviously), but reads from only a single drive (assuming it is > correct). That means that read latency is greatly reduced since they > can be split across two drives which effectively means two heads per > "platter." Also, raid1 typically does not include checksumming, so if > there is a discrepancy between the drives there is no way to know > which one is right. With raid5 at least you can always correct > discrepancies if you have all the disks (though as Duncan pointed out > in practice this only happens if you do an explicit scrub on mdadm). > With btrfs every block is checksummed and so as long as there is one > good (err, consistent) copy somewhere it will be used. > > Rich >
Humm... OK, we agree on RAID1 writes. All data must be written to all drives so there's no way to implement any real speed up in that area. If I simplistically assume that write speeds are similar to hdparm -tT read speeds then that's that. On the read side I'm not sure if I'm understanding your point. I agree that a so-designed RAID1 system could/might read smaller portions of a larger read from RAID1 drives in parallel, taking some data from one drive and some from another drive, and then only take action corrective if one of the drives had troubles. However I don't know that mdadm-based RAID1 does anything like that. Does it? It seems to me that unless I at least _request_ all data from all drives and minimally compare at least some error flag from the controller telling me one drive had trouble reading a sector then how do I know if anything bad is happening? Or maybe you're saying it's RAID1 and I don't know if anything bad is happening _unless_ I do a scrub and specifically check all the drives for consistency? Just trying to get clear what you're saying. I do mdadm scrubs at least once a week. I still do them by hand. They have never appeared terribly expensive watching top or iotop but sometimes when I'm watching NetFlix or Hulu in a VM I get more pauses when the scrub is taking place, but it's not huge. I agree that RAID5 gives you an opportunity to get things fixed, but there are folks who lose a disk in a RAID5, start the rebuild, and then lose a second disk during the rebuild. That was my main reason to go to RAID6. Not that I would ever run the array degraded but that I could still tolerate a second loss while the rebuild was happening and hopefully get by. That was similar to my old 3-disk RAID1 where I'd have to lose all 3 disks to be out of business. Thanks, Mark