2 drives, slow software RAID1 (md)

Solution 1:

Could you please try bonnie++ benchmark tool? You should run it with twice the size of the memory (example for 1GB):

bonnie++ -s $((2*1024))

Your problem description makes me think it is the controller that can't easily handle the parallel writes that the software RAID1 does. Use the command above on the following situations. To check if this hypothesis is true, please do:

1) Separate benchmarks for each hard disk. Hypothesis says that the results will be similar.

2) Benchmark the RAID1.

3) Simultaneous benchmark on different disks. Hypothesis says that it should look more like 2) than 1).

Good luck,
João Miguel Neves

Solution 2:

I agree that you're getting a performance disparity between the disks: just look at the disparity in queue sizes. However, we don't yet know whether to blame the disks themselves or something higher up the stack. A couple of experiments:

  1. Make an md3 with a partition from sdb as the first element of the mirror and a partition of sda as the second: see if performance follows the disk or the software RAID. (This would surprise me, but it might be worth doing before the second experiment which requires (eugh) physical access.)

  2. Physically swap the connections to sda and sdb. If performance changes now, you should blame your disk controller.