On Tue, Jan 11, 2022 at 1:00 PM Richard W.M. Jones <rjones(a)redhat.com> wrote:
On Tue, Jan 11, 2022 at 08:07:39AM +0100, Laszlo Ersek wrote:
> hmmmm, not necessarily; according to the manual, "qemu-img convert" uses
> (by default) 8 co-routines. There's also the -W flag ("out of order
> writes"), which I don't know if the original virt-v2v used.
I'm never sure how qemu coroutines map to threads. I assume it's not
1-1, and it's somehow connected to the iothread setting?
In qemu-img and qemu-nbd, when using cache=none and aio=native there
is one thread submitting io via libaio.
When using aio=threads we can see multiple threads doing the I/O. I don't
know how qemu maps request to threads, but it seems that we have one
thread per inflight request, but never more than 16 (qmu-nbd never handle
more than 16 inflight requests per client).
I tested with "nbdcopy --connections 1 --requests ..." and we see the same
number of threads in qemu-nbd plus one idle thread when requests < 16.
Nir