Skip to content

Commit

Permalink
pkg/image/nbdkit: Enable recommended nbdkit VDDK debugging options
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rwmjones authored and kubevirt-bot committed Aug 20, 2024
1 parent 7b87380 commit 663a742
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/image/nbdkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 663a742

Please sign in to comment.