qemu-devel
[Top][All Lists]
Advanced

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

Re: Maximum QMP reply size


From: Daniel P . Berrangé
Subject: Re: Maximum QMP reply size
Date: Wed, 7 Sep 2022 08:57:49 +0100
User-agent: Mutt/2.2.6 (2022-06-05)

On Tue, Sep 06, 2022 at 03:38:54PM -0400, John Snow wrote:
> Hi, I suspect I have asked this before, but I didn't write it down in
> a comment, so I forget my justification...
> 
> In the QMP lib, we need to set a buffering limit for how big a QMP
> message can be -- In practice, I found that the largest possible
> response was the QAPI schema reply, and I set the code to this:
> 
>     # Maximum allowable size of read buffer
>     _limit = (64 * 1024)
> 
> However, I didn't document if this was a reasonable limit or just a
> "worksforme" one. I assume that there's no hard limit for the protocol
> or the implementation thereof in QEMU. Is there any kind of value here
> that would be more sensible than another?

As a reference, libvirt arbitrarily chose 10 MB as the QMP reply
limit. It is huge enough it'll be hard to make a QMP reply exceed
that, but also still tiny in the context of managing VMs on a host
with GB's of RAM.  NB, this doesn't mean we allocate 10 MB every
time, it is just an upper bound - we only allocate what we actually
need.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]