]> asedeno.scripts.mit.edu Git - linux.git/commit
md/raid10: read balance chooses idlest disk for SSD
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 14 Jun 2019 22:41:11 +0000 (15:41 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 15 Jun 2019 07:37:35 +0000 (01:37 -0600)
commite9eeba28a1e01a55b49cdcf9c7a346d2aaa0aa7d
treea11ec9c1ea3aa524798929a38158667a81218c3e
parentc7afa8034b09bc2bb664d86de7db34466401f352
md/raid10: read balance chooses idlest disk for SSD

Andy reported that raid10 array with SSD disks has poor
read performance. Compared with raid1, RAID-1 can be 3x
faster than RAID-10 sometimes [1].

The thing is that raid10 chooses the low distance disk
for read request, however, the approach doesn't work
well for SSD device since it doesn't have spindle like
HDD, we should just read from the SSD which has less
pending IO like commit 9dedf60313fa4 ("md/raid1: read
balance chooses idlest disk for SSD").

So this commit selects the idlest SSD disk for read if
array has none rotational disk, otherwise, read_balance
uses the previous distance priority algorithm. With the
change, the performance of raid10 gets increased largely
per Andy's test [2].

[1]. https://marc.info/?l=linux-raid&m=155915890004761&w=2
[2]. https://marc.info/?l=linux-raid&m=155990654223786&w=2

Tested-by: Andy Smith <andy@strugglers.net>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/raid10.c