On Sat, Feb 12, 2022 at 10:49:42PM +0200, Nir Soffer wrote:
rhv-upload plugin is translating every NBD command to HTTP request,
translated back to NBD command on imageio server. The HTTP client and
server, and the NBD client on the imageio server side are synchronous
and implemented in python, so they have high overhead per request. To
get good performance we need to use larger request size.
Testing shows that request size of 8MiB is best, speeding up the copy
disk phase from 14.7 seconds to 7.7 seconds (1.9x times faster).
Unfortunately this will break VDDK since it cannot handle very large
requests (I think 4M is about the max without reconfiguring the
server). Also larger requests have adverse performance effects in
other configurations, although I understand this patch tries to
retrict the change to when the output mode is rhv-upload.
We need to think of some other approach, but I'm not sure what it is.
I'd really like to be able to talk to imageio's NBD server directly!
Other relevant commits:
https://github.com/libguestfs/virt-v2v/commit/7ebb2c8db9d4d297fbbef116a98...
https://github.com/libguestfs/virt-v2v/commit/08e764959ec9dadd71a95d22d3d...
[...]
This is an ugly hack; the preferred request size should be a function
of
the output module that only output_rhv_upload will override, but I don't
know how to implement this with the current code.
Just add a new value to output/output.ml{,i}. There is no
superclassing (this is not OO) so you'll have to add the value to
every output module implementation, defaulting to None.
However I'd like to think of another approach first.
- Have nbdcopy split and combine requests so request size for input
and output can be different? Sounds complicated but might be
necessary one day to support minimum block size.
- More efficient Python plugin that might combine requests? Also
complicated ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v