On 21.03.2014 13:06, Paolo Bonzini wrote:
Il 21/03/2014 12:49, Peter Lieven ha scritto:
A 10G logical volume was created and filled with random data.
Then the logical volume was exported via qemu-img convert to an iscsi target.
Before the export was started all caches of the linux kernel where dropped.
Old behavior:
- The convert process took 3m45s and the buffer cache grew up to 9.67 GB close
to the end of the conversion. After qemu-img terminated all the buffers were
freed by the kernel.
New behavior with the -N switch:
- The convert process took 3m43s and the buffer cache grew up to 15.48 MB close
to the end with some small peaks up to 30 MB durine the conversion.
Signed-off-by: Peter Lieven <p...@kamp.de>
---
v1->v2: - added test example to commit msg
- added -N knob to qemu-img
I'm sorry, I cannot find the original discussion. Why is the new knob needed?
The thread was named "qemu-img convert cache mode for source".
I think the 2 points (mainly by Marcus) were that you would not expect qemu-img
to mangle with the page cache by default as you would not expect it from cp or
dd.
And secondly, if a running vServer and the image that is converted share pages
it
can ruin the vServers cache.
Peter