]> git.baikalelectronics.ru Git - kernel.git/commit
dm writecache: improve performance of large linear writes on SSDs
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 15 Jan 2020 09:35:22 +0000 (04:35 -0500)
committerMike Snitzer <snitzer@redhat.com>
Thu, 16 Jan 2020 18:34:17 +0000 (13:34 -0500)
commitdcd195071f22d4770911ca46694ca398b6d5101d
treecaa113ebf22d61d9034bc36fee85cb81b6061f69
parentbe240ff5e402df49c4ddbcb0595ef96009239f6a
dm writecache: improve performance of large linear writes on SSDs

When dm-writecache is used with SSD as a cache device, it would submit a
separate bio for each written block. The I/Os would be merged by the disk
scheduler, but this merging degrades performance.

Improve dm-writecache performance by submitting larger bios - this is
possible as long as there is consecutive free space on the cache
device.

Benchmark (arm64 with 64k page size, using /dev/ram0 as a cache device):

fio --bs=512k --iodepth=32 --size=400M --direct=1 \
    --filename=/dev/mapper/cache --rw=randwrite --numjobs=1 --name=test

block old new
size MiB/s MiB/s
---------------------
512 181 700
1k 347 1256
2k 644 2020
4k 1183 2759
8k 1852 3333
16k 2469 3509
32k 2974 3670
64k 3404 3810

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-writecache.c