tools/ocaml/xenctrl: Use larger chunksize in domain_getinfolist

domain_getinfolist() is quadratic with the number of domains, because of the
behaviour of the underlying hypercall.  Nevertheless, getting domain info in
blocks of 1024 is far more efficient than blocks of 2.

In a scalability testing scenario with ~1000 VMs, a combination of this and
the previous change takes xenopsd's wallclock time in domain_getinfolist()
down from 88% to 0.02%

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Tested-by: Pau Ruiz Safont <pau.safont@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
This commit is contained in:
Edwin Török authored and Andrew Cooper committed 2022-12-01 16:07:17 +00:00
1 parent c3b6be714c
commit 95db09b1b1
1 file changed
+1 -1
+1 -1
View File
@@ -233,7 +233,7 @@ let rev_append_fold acc e = List.rev_append e acc
let rev_concat lst = List.fold_left rev_append_fold [] lst
let domain_getinfolist handle first_domain =
let nb = 2 in
let nb = 1024 in
let rec __getlist lst from =
(* _domain_getinfolist returns domains in reverse order, largest first *)
match _domain_getinfolist handle from nb with
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.