Richard W.M. Jones
2020-May-19 13:44 UTC
[Libguestfs] [PATCH virt-v2v] v2v: -o libvirt: Remove cache=none.
Traditionally if you did live migration (KVM to KVM), you had to ensure that cache=none was set on all disks of the guest up front. This was because of quirks in how NFS works (I think the close-to-open consistency and the fact that during live migration both qemus have the file open), and we had to assume the worst case that a guest might be backed by NFS. Because of this when virt-v2v converts a guest to run on KVM using libvirt it sets cache=none. This is not necessary with modern qemu. If qemu supports the drop-cache property of the file block driver, which libvirt will automatically detect for us, then libvirt live migration is able to tell qemu to drop cached data at the right time even if the backing is NFS. It also had a significant performance impact. In some synthetic benchmarks it could show 2 or 3 times slower performance. Thanks: Ming Xie, Peter Krempa. --- v2v/create_libvirt_xml.ml | 1 - 1 file changed, 1 deletion(-) diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml index 05553c4f7d..5a1fba0fd6 100644 --- a/v2v/create_libvirt_xml.ml +++ b/v2v/create_libvirt_xml.ml @@ -336,7 +336,6 @@ let create_libvirt_xml ?pool source targets target_buses guestcaps e "driver" [ "name", "qemu"; "type", t.target_format; - "cache", "none" ] []; (match pool with | None -> -- 2.26.2
Richard W.M. Jones
2020-May-19 15:50 UTC
Re: [Libguestfs] [PATCH virt-v2v] v2v: -o libvirt: Remove cache=none.
This patch is incomplete since it doesn't fix certain tests which match on the generated XML. v2 coming up ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Possibly Parallel Threads
- [PATCH virt-v2v v2] v2v: -o libvirt: Remove cache=none.
- Re: [PATCH] v2v: Add support for libosinfo metadata
- [PATCH v2] v2v: Add support for libosinfo metadata
- Re: [PATCH 5/6] v2v: -o libvirt: Add virtio-rng, balloon and pvpanic to output XML (RHBZ#1438794).
- [PATCH 5/6] v2v: -o libvirt: Add virtio-rng, balloon and pvpanic to output XML (RHBZ#1438794).