[Libguestfs] [PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.

Pino Toscano ptoscano at redhat.com
Fri Sep 18 12:03:00 UTC 2020


On Friday, 18 September 2020 11:44:04 CEST Richard W.M. Jones wrote:
>    let g = open_guestfs ~identifier:"v2v" () in
>    g#set_memsize (g#get_memsize () * 14 / 5);
> +  (* Setting the number of vCPUs allows parallel mkinitrd. *)
> +  g#set_smp (Sysconf.nr_processors_online ());

IMHO this is not a good idea, for few reasons:

a) it unconditionally uses all the available CPUs with no way to change
it to any other value

b) virt-v2v is run also on systems that are not specifically dedicated
as conversion servers, for example the oVirt hosts (that run the oVirt
VMs); in this context, suddently using more CPUs than requested may
saturate the system resources

IMHO the right approach is to add a --smp N option like available in
other libguestfs tools; this way, the user can decide how many
resources virt-v2v can use.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20200918/78387699/attachment.sig>


More information about the Libguestfs mailing list