[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] tools/ocaml/xenctrl: Use larger chunksize in domain_getinfolist



commit 95db09b1b154fb72fad861815ceae1f3fa49fc4e
Author:     Edwin Török <edvin.torok@xxxxxxxxxx>
AuthorDate: Tue Nov 1 17:59:17 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Dec 1 16:07:17 2022 +0000

    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@xxxxxxxxxx>
    Tested-by: Pau Ruiz Safont <pau.safont@xxxxxxxxxx>
    Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
---
 tools/ocaml/libs/xc/xenctrl.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml
index 85b73a7f6f..aa650533f7 100644
--- a/tools/ocaml/libs/xc/xenctrl.ml
+++ b/tools/ocaml/libs/xc/xenctrl.ml
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.