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

[libvirt] [PATCH] rpc: Allow up to 256K records to be returned from virConnectGetAllDomainStats.



In commit 89a706681cb3a4aa003d920db3163b809cfbc9ca, the returned
array of stats is limited to REMOTE_DOMAIN_LIST_MAX entries (4096).

As well as being far too low -- this breaks if a single guest is added
with 320 disks -- it also seems as if use of REMOTE_DOMAIN_LIST_MAX
was a mistake, and it should be using
REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX instead.

However REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX is also too low (also
4096), so this patch also increases the limit to something more
sensible, allowing us to cope with lots of stats from lots of domains
in future.  (This limit could be increased further quite easily since
each stats record takes about 32 bytes, and the maximum message size
is currently 32 MB, so we could increase the limit by another factor
of 4 without touching the maximum message size).

I tested this using a guest with 320, 500 and 1000 disks with no issues.

Signed-off-by: Richard W.M. Jones <rjones redhat com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1440683
---
 src/remote/remote_protocol.x | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 25e62a181..142508713 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -233,7 +233,7 @@ const REMOTE_DOMAIN_FSFREEZE_MOUNTPOINTS_MAX = 256;
 const REMOTE_NETWORK_DHCP_LEASES_MAX = 65536;
 
 /* Upper limit on count of parameters returned via bulk stats API */
-const REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX = 4096;
+const REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX = 262144;
 
 /* Upper limit of message size for tunable event. */
 const REMOTE_DOMAIN_EVENT_TUNABLE_MAX = 2048;
@@ -3264,7 +3264,7 @@ struct remote_domain_event_callback_agent_lifecycle_msg {
 };
 
 struct remote_connect_get_all_domain_stats_ret {
-    remote_domain_stats_record retStats<REMOTE_DOMAIN_LIST_MAX>;
+    remote_domain_stats_record retStats<REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX>;
 };
 
 struct remote_domain_fsinfo {
-- 
2.13.0


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