From 94cf9be0f87d628c2ab427eccfcaf24f998f70c0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 7 Dec 2021 13:48:05 +0000 Subject: [PATCH] Don't use nbdkit-file-plugin cache=none when writing Further performance fix for https://bugzilla.redhat.com/2011713 related: rhbz#2011713 --- ...-nbdkit-file-plugin-cache-none-when-.patch | 57 +++++++++++++++++++ ...correct-qemu-binary-for-o-qemu-mode-.patch | 2 +- ...-the-qemu-boot-oo-qemu-boot-option-R.patch | 2 +- ...-supported-sound-cards-to-match-RHEL.patch | 2 +- ...RHEL-Fixes-for-libguestfs-winsupport.patch | 2 +- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 2 +- ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 2 +- ...-for-supported-v2v-hypervisors-guest.patch | 2 +- ....patch => 0009-RHEL-Disable-o-glance.patch | 2 +- ...0010-RHEL-Remove-the-in-place-option.patch | 2 +- virt-v2v.spec | 28 +++++---- 11 files changed, 79 insertions(+), 24 deletions(-) create mode 100644 0001-output-Don-t-use-nbdkit-file-plugin-cache-none-when-.patch rename 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch => 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch (94%) rename 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch => 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch (98%) rename 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch => 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch (92%) rename 0004-RHEL-Fixes-for-libguestfs-winsupport.patch => 0005-RHEL-Fixes-for-libguestfs-winsupport.patch (98%) rename 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch => 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch (93%) rename 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch => 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch (91%) rename 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch => 0008-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch (97%) rename 0008-RHEL-Disable-o-glance.patch => 0009-RHEL-Disable-o-glance.patch (99%) rename 0009-RHEL-Remove-the-in-place-option.patch => 0010-RHEL-Remove-the-in-place-option.patch (98%) diff --git a/0001-output-Don-t-use-nbdkit-file-plugin-cache-none-when-.patch b/0001-output-Don-t-use-nbdkit-file-plugin-cache-none-when-.patch new file mode 100644 index 0000000..b4b690e --- /dev/null +++ b/0001-output-Don-t-use-nbdkit-file-plugin-cache-none-when-.patch @@ -0,0 +1,57 @@ +From ac59d3b2310511b1537d408b675b19ec9a5d384e Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 7 Dec 2021 12:53:41 +0000 +Subject: [PATCH] output: Don't use nbdkit-file-plugin cache=none when writing + +nbdkit-file-plugin flag cache=none is meant to ensure that the file +plugin does not pollute the page cache. However it doesn't yet work +very well, especially for writing. As you can see here: + +https://gitlab.com/nbdkit/nbdkit/-/blob/048d5b9818c88355e596824355269773e5c4f6ad/plugins/file/file.c#L594 + +it is currently implemented by flushing the whole file (including +parallel requests), and then evicting the data from the page cache. +This implementation is naive. (See nbdcopy copy/file-ops.c for a much +better implementation.) + +This causes quite a considerable slow down when writing to a local +file (eg -os local). The penalty varies between machines and possibly +kernels. On my Fedora Rawhide AMD server with 12 cores and SSDs, the +slow down is under 5%. But on my RHEL 9 Intel NUC server with 2 cores +and a hard disk, it makes a really huge difference, nearly doubling +the total time taken. + +I left a note in the code that we should fix this in nbdkit and re-add +this option or similar when it is working. + +I also removed the fadvise=sequential option. This is associated with +cache=none in the nbdkit documentation, and anyway we are not doing +sequential writes. (This makes no measurable difference in my testing) +--- + output/output.ml | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/output/output.ml b/output/output.ml +index 7e976508..f829fe43 100644 +--- a/output/output.ml ++++ b/output/output.ml +@@ -98,8 +98,14 @@ let output_to_local_file ?(changeuid = fun f -> f ()) + let cmd = Nbdkit.add_arg cmd "file" filename in + let cmd = + if Nbdkit.version nbdkit_config >= (1, 22, 0) then ( +- let cmd = Nbdkit.add_arg cmd "fadvise" "sequential" in +- let cmd = Nbdkit.add_arg cmd "cache" "none" in ++ (* nbdkit 1.28 has a very naive implementation of ++ * page cache eviction. We need to copy the one from ++ * nbdcopy copy/file-ops.c. Until then do not use ++ * this flag because it causes a large slow down on ++ * some machines. XXX ++ *) ++ (*let cmd = Nbdkit.add_arg cmd "fadvise" "sequential" in ++ let cmd = Nbdkit.add_arg cmd "cache" "none" in*) + cmd + ) + else cmd in +-- +2.31.1 + diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch similarity index 94% rename from 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename to 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 6c38b34..ecf270c 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 950985cd43569d085b1198a15d9ffe0185e954a5 Mon Sep 17 00:00:00 2001 +From a0cc1fcb8f577802908887ed6cf98913f4260481 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch similarity index 98% rename from 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch rename to 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index 1b11668..47733ea 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ b/0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,4 +1,4 @@ -From 30dd7bf52be72eb2d4d638db89924a701a8290c3 Mon Sep 17 00:00:00 2001 +From 46ae00f83c2f4459fcdbf090d02a3f5cb4421fe9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 92% rename from 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index 509f2b3..a8eacd7 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From 8d76ce9a924775b20f5d7a92e2709393e80a3312 Mon Sep 17 00:00:00 2001 +From b12adf807a16e71764601f5912f98ead7839e25a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu diff --git a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch b/0005-RHEL-Fixes-for-libguestfs-winsupport.patch similarity index 98% rename from 0004-RHEL-Fixes-for-libguestfs-winsupport.patch rename to 0005-RHEL-Fixes-for-libguestfs-winsupport.patch index cbb28ec..420b114 100644 --- a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch +++ b/0005-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,4 +1,4 @@ -From 225d717b0bfc70d4eaacee8bb09dc4d8cfc3219e Mon Sep 17 00:00:00 2001 +From 836076de3059b12d54f098853bf5b35087885eeb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport. diff --git a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch similarity index 93% rename from 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename to 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index e88a247..5300f4c 100644 --- a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From 105f5aa22cd03e480b63f61b56e7459db69d41c8 Mon Sep 17 00:00:00 2001 +From 9b570f662ac6e72abeec7271856a08c759a3bca7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) diff --git a/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch similarity index 91% rename from 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch rename to 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index c62f915..b03a5aa 100644 --- a/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,4 +1,4 @@ -From 8d8dcce022f27e5c82f0bb72fddf5b9329373761 Mon Sep 17 00:00:00 2001 +From 2a96ca52ae36874d333b199caea11594ad82638f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) diff --git a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0008-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 97% rename from 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0008-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index d85c84a..b298b91 100644 --- a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0008-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From 98e2603f7ff0a2cd9f23f80dd1d22f908a1a869d Mon Sep 17 00:00:00 2001 +From d3536cfb1a741b296cd904db303cb002cae4fbfd Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests diff --git a/0008-RHEL-Disable-o-glance.patch b/0009-RHEL-Disable-o-glance.patch similarity index 99% rename from 0008-RHEL-Disable-o-glance.patch rename to 0009-RHEL-Disable-o-glance.patch index 008c1eb..ad8244a 100644 --- a/0008-RHEL-Disable-o-glance.patch +++ b/0009-RHEL-Disable-o-glance.patch @@ -1,4 +1,4 @@ -From e1f82d3ca83499a4fce6347664a277679c04db93 Mon Sep 17 00:00:00 2001 +From 608b966f2f41ccd3e500a16496b9ff1b456d99e0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 11:15:52 +0100 Subject: [PATCH] RHEL: Disable -o glance diff --git a/0009-RHEL-Remove-the-in-place-option.patch b/0010-RHEL-Remove-the-in-place-option.patch similarity index 98% rename from 0009-RHEL-Remove-the-in-place-option.patch rename to 0010-RHEL-Remove-the-in-place-option.patch index acd6c4d..af2d769 100644 --- a/0009-RHEL-Remove-the-in-place-option.patch +++ b/0010-RHEL-Remove-the-in-place-option.patch @@ -1,4 +1,4 @@ -From c7de0b56ada81868aecd1c719bc3621109675b60 Mon Sep 17 00:00:00 2001 +From c4e64b06d8e92cf82fc1fee881876ffe45add057 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Dec 2021 11:56:05 +0000 Subject: [PATCH] RHEL: Remove the --in-place option diff --git a/virt-v2v.spec b/virt-v2v.spec index d8f9384..8a09299 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 Version: 1.45.94 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPLv2+ @@ -51,15 +51,16 @@ ExclusiveArch: x86_64 # Downstream (RHEL-only) patches. %if 0%{?rhel} # Patches. -Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch -Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch -Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch0006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch -Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch0008: 0008-RHEL-Disable-o-glance.patch -Patch0009: 0009-RHEL-Remove-the-in-place-option.patch +Patch0001: 0001-output-Don-t-use-nbdkit-file-plugin-cache-none-when-.patch +Patch0002: 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch0003: 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +Patch0004: 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch0005: 0005-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch0006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch0007: 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +Patch0008: 0008-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch0009: 0009-RHEL-Disable-o-glance.patch +Patch0010: 0010-RHEL-Remove-the-in-place-option.patch %endif %if 0%{patches_touch_autotools} @@ -300,11 +301,8 @@ popd %changelog -* Tue Dec 07 2021 Richard W.M. Jones - 1:1.45.94-1 -- New upstream development version 1.45.94 (preview of 2.0) - -* Fri Dec 03 2021 Richard W.M. Jones - 1:1.45.93-1 -- Rebase to upstream 1.45.93. +* Tue Dec 07 2021 Richard W.M. Jones - 1:1.45.94-2 +- Rebase to upstream 1.45.94. - Change video type to VGA (instead of QXL). - Remove --in-place support properly. - Remove -o glance support properly.