Am 10.05.2015 um 18:10 schrieb Paolo Bonzini:
On 10/05/2015 18:02, Stefan Weil wrote:
Since the default qemu-img convert case isn't slowed down, I
would think that correctness trumps performance. Nevertheless,
it's a huge difference.
I doubt that the convert case isn't slowed down.
The *default* convert case isn't slowed down because "qemu-img convert"
defaults to the "unsafe" cache mode.
The *non-default* convert case with flushes was slowed down indeed: 2x
in total (if you include the final flush done by bdrv_close), and 10x if
you only consider the sequential write part of convert.
Paolo
For those who might be interested:
The relevant GPL source code from VirtualBox is available here:
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Storage
If I interpret that code correctly, blocks are normally written
asynchronously,
but changes of metadata (new block allocation) are written synchronously.
See file VDI.cpp (function vdiBlockAllocUpdate) and VD.cpp
(vdIOIntWriteMeta).
Stefan