[Libguestfs] [PATCH libnbd 3/3] examples: copy-libev.c: Support extents

Eric Blake eblake at redhat.com
Mon Mar 8 15:13:35 UTC 2021


On 3/7/21 5:26 PM, Nir Soffer wrote:
> On Mon, Mar 8, 2021 at 12:59 AM Nir Soffer <nsoffer at redhat.com> 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?)

Known issue in nbdkit.  Right now, nbdkit defaults a parallel plugin to
16 threads (altered when using a plugin that has a serialized thread
model, or if you use the command-line option --threads=1), and starts
all of those threads regardless of how many parallel requests the client
actually sends.  One of the TODO items is to refactor it to have nbdkit
use a thread pool, which starts with just one worker thread, and can add
workers up to the --threads limit, but where workers are added only when
under actual pressure from parallel guest commands.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list