![RAID1 performance with madam](https://linux22.com/image/550624/RAID1%20performance%20with%20madam.png)
I am looking into performance issues we are having. We currently have a 4 drive RAID5 (3+1 fail over) and read performance sucks.
Looking at RAID1 with 2 drives (maybe more, any benefit?) but from what I have read around, RAID1 with madam doesn't seem to give any more performance over reads than a single drive, eg it would split the reads over the 2 drives.
Is linux software RAID1 better performance than single drive?
答案1
Single-threaded application performance on mdadm RAID1 is indeed no better than using a single disk. That's because mdadm chooses one of the disks in the array to satisfy a given read request. So if your workload consists of a single process reading sequentially from a single file, then mdadm RAID1 will not outperform a single disk.
However, if your workload instead consists of many parallel file accesses---such as would occur in a file server being hit by multiple users at once---then RAID1 will be faster than a single disk because the concurrent read requests are allocated across multiple disk spindles.
In summary, whether or not mdadm RAID1 will be faster than a single disk depends a lot on your particular mix of workloads.
答案2
The "far" layout may give you better read performance (see http://neil.brown.name/blog/20040827225440). Apart of that RAID1 with md gives redundancy, but no speed boost.
Edit: For read performance play with readahead (i.e. increase it. A lot.) . It can work wonders.
答案3
RAID1 is mirroring, so you can't expect any speed increases. RAID0 (striping) does indeed increase the speed, up to the factor 2, but less in reality.
It has the drawback of total data loss in case of the failure of one drive, though.
Are you currently using a Linux software RAID5? If so, a "sucking" read performance would not be normal, there must be a reason for it.