I believe this roughly implements Nir's proposal here:
https://www.redhat.com/archives/libguestfs/2020-August/msg00028.html
Unfortunately it doesn't work for me. It actually slows things down
quite a lot, for reasons I don't understand. Note the adjustment of
the pool-max parameter and how it affects the total time. The results
are quite reproducible.
$ ./nbdkit -r -U - vddk libdir=~/tmp/vddk-7.0.0/vmware-vix-disklib-distrib user=root
password=*** server=*** thumbprint=*** vm=moref=3 file='[datastore1] Fedora 28/Fedora
28.vmdk' pool-max=1 --run 'time qemu-img convert -p -W -m 16 $nbd
/var/tmp/out'
(100.00/100%)
real 1m8.031s
user 0m0.112s
sys 0m1.560s
$ ./nbdkit -r -U - vddk libdir=~/tmp/vddk-7.0.0/vmware-vix-disklib-distrib user=root
password=*** server=*** thumbprint=*** vm=moref=3 file='[datastore1] Fedora 28/Fedora
28.vmdk' pool-max=8 --run 'time qemu-img convert -p -W -m 16 $nbd
/var/tmp/out'
(100.00/100%)
real 1m27.790s
user 0m0.099s
sys 0m1.625s
I'm still investigating this. Could be a simple coding error somewhere.
Rich.