Displaying 4 results from an estimated 4 matches for "nr_processors_online".
2020 Sep 18
0
[PATCH common] mlutils: Simple wrapper around sysconf (_SC_NPROCESSORS_ONLN).
...@@ extern value guestfs_int_mllib_mkdtemp (value val_pattern);
extern value guestfs_int_mllib_realpath (value pathv);
extern value guestfs_int_mllib_statvfs_statvfs (value pathv);
extern value guestfs_int_mllib_statvfs_is_network_filesystem (value pathv);
+extern value guestfs_int_mllib_sysconf_nr_processors_online (value unitv);
/* NB: This is a "noalloc" call. */
value
@@ -368,3 +369,17 @@ guestfs_int_mllib_statvfs_is_network_filesystem (value pathv)
return Val_bool (0);
#endif
}
+
+/* NB: This is a "noalloc" call. */
+value
+guestfs_int_mllib_sysconf_nr_processors_online (value...
2020 Sep 18
1
Re: [PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
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...
2020 Sep 18
4
[PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
So it didn't make any noticable difference in my test. I wonder if
the test guest I'm using (Fedora 32 using dracut) doesn't use parallel
compression?
However I don't think it can cause a problem and it seems obvious that
it could benefit some cases.
Rich.
2020 Sep 18
0
[PATCH v2v] v2v: Set the number of vCPUs to same as host number of pCPUs.
...v.ml
index 73edff2c4..7637b1a8c 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -88,6 +88,8 @@ let rec main () =
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 ());
(* The network is only used by the unconfigure_vmware () function. *)
g#set_network true;
(match conversion_mode with
--
2.27.0