On Mon, Mar 08, 2021 at 01:26:44AM +0200, Nir Soffer wrote:
$ strace -f -c ../copy/nbdcopy --sparse=1048576
--request-size=1048576
--requests=16 --connections=1 $SRC $DST
strace: Process 1094611 attached
strace: Process 1094612 attached
strace: Process 1094613 attached
strace: Process 1094614 attached
strace: Process 1094615 attached
strace: Process 1094616 attached
strace: Process 1094617 attached
strace: Process 1094618 attached
strace: Process 1094619 attached
strace: Process 1094620 attached
strace: Process 1094621 attached
strace: Process 1094622 attached
strace: Process 1094623 attached
strace: Process 1094641 attached
(Not sure why we start so many threads with --connections=1 - bug?)
I'm not sure of the exact command, so I used:
$ ./run nbdcopy --sparse=1048576 --request-size=1048576 --requests=16 --connections=1 --
[ qemu-nbd -f qcow2 -t ~/fedora-32.qcow2 ] [ nbdkit memory 6G ]
Temporarily adding -v shows:
nbdcopy: src: nbd_ops "qemu-nbd"
nbdcopy: src: size=6442450944
nbdcopy: dst: nbd_ops "nbdkit"
nbdcopy: dst: size=6442450944
nbdcopy: connections=1 requests=16 threads=1 synchronous=false
^^^^^^^^^
Many threads were created but they all appeared to be associated with
the ./run script, qemu-nbd and nbdkit. nbdcopy should only create one
worker thread in this scenario.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/