From 663a742b079359fd061c4cab947287c11b35c30b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 Jul 2024 16:53:21 +0100 Subject: [PATCH] pkg/image/nbdkit: Enable recommended nbdkit VDDK debugging options VDDK datapath debugging logs every VDDK read and write which is noisy and unnecessary. Enabling VDDK stats gives useful information about how long each VDDK call took, for virtually no overhead. This information is printed to stderr when nbdkit closes the connection. This matches the upstream recommendations here, and also the flags used by virt-v2v: https://libguestfs.org/nbdkit-vddk-plugin.1.html#Troubleshooting-performance-problems Signed-off-by: Richard W.M. Jones --- pkg/image/nbdkit.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/image/nbdkit.go b/pkg/image/nbdkit.go index 9ee1d8e498..0796d061c6 100644 --- a/pkg/image/nbdkit.go +++ b/pkg/image/nbdkit.go @@ -145,6 +145,8 @@ func NewNbdkitVddk(nbdkitPidFile, socket, server, username, password, thumbprint } pluginArgs = append(pluginArgs, "--verbose") pluginArgs = append(pluginArgs, "-D", "nbdkit.backend.datapath=0") + pluginArgs = append(pluginArgs, "-D", "vddk.datapath=0") + pluginArgs = append(pluginArgs, "-D", "vddk.stats=1") p := getVddkPluginPath() n := &Nbdkit{ NbdPidFile: nbdkitPidFile,