Skip to content

qcow2: seriously improve savevm performance

Denis V. Lunev qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2aio: allow to wait for coroutine pool from different coroutineblock/aio_task.c+4 -42 replies
2/2qcow2: improve savevm performanceblock/qcow2.c block/qcow2.h+113 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] qcow2: seriously improve savevm performance

This series do standard basic things:
- it creates intermediate buffer for all writes from QEMU migration code to QCOW2 image,
- this buffer is sent to disk asynchronously, allowing several writes to run in parallel.

In general, migration code is fantastically inefficent (by observation), buffers are not aligned and sent with arbitrary pieces, a lot of time less than 100 bytes at a chunk, which results in read-modify-write operations with non-cached operations. It should also be noted that all operations are performed into unallocated image blocks, which also suffer due to partial writes to such new clusters.

This patch series is an implementation of idea discussed in the RFC posted by Denis
https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg01925.html
Results with this series over NVME are better than original code

                original     rfc    this
cached:          1.79s      2.38s   1.27s
non-cached:      3.29s      1.31s   0.81s
CC Kevin Wolf <[email protected]>
CC Max Reitz <[email protected]>
CC Vladimir Sementsov-Ogievskiy <[email protected]>
CC Denis Plotnikov <[email protected]>