virtio-blk FUA write support has been introduced to the virtio spec [1], and a kernel patch is under review [2]. This patch enables FUA on the virtio-blk device, so guests can submit FUA writes instead of the slower alternative of a regular write followed by a flush.
A simple randwrite fio workload on a RAM disk (bs=4k, iodepth=1, direct=1, sync=1) shows a throughput improvement of 17.1k IOPS to 27.7k IOPS (+62%). [1] https://lore.kernel.org/virtio-comment/[email protected]/ [2] https://lore.kernel.org/linux-block/[email protected]/ Alberto Faria (2): include: Add virtio-blk request flag FUA definitions virtio-blk: Add support for FUA write requests hw/block/virtio-blk.c | 27 +++++++++++++++++++++ hw/core/machine.c | 1 + hw/virtio/virtio-qmp.c | 4 +++ include/hw/virtio/virtio-blk.h | 1 + include/standard-headers/linux/virtio_blk.h | 13 ++++++++-- 5 files changed, 44 insertions(+), 2 deletions(-) -- 2.56.0
