7/27/2016 2:14 PM, Daniel P. Berrange пишет:
On Wed, Jul 27, 2016 at 01:09:38PM +0200, Pavel Hrdina wrote:
On Wed, Jul 13, 2016 at 01:42:17PM +0300, Derbyshev Dmitriy wrote:
From: Igor Redko <red...@virtuozzo.com>

Communication with qemu monitor is time-consuming and there is
additional overhead for converting qemu_binary->json->libvirt_binary.

This patch tries to avoid unnecessary qmp queries.
Knowing period of balloon statistics update cycle and timestamps of last update
provided by qemu, it is possible to make cache of last response and reuse it
for next requests.
I don't think that this is necessary.  It doesn't take that much time to get the
memory stats and if someone want's to spam libvirt about those stats, well it's
pointless.  NACK from me to this patch and the last one, but let's see if
someone else has a different opinion.
Yeah, I don't really see a need for this. The stats refresh period is
exposed in the XML, so an application using libvirt can simply avoid
calling this libvirt API more frequently than the configured stats
period.


Regards,
Daniel
Our use-case may be somewhat different from the one you have in mind: several almost independent applications sending requests for new stats every now and then. Even though each one of these applications may reduce the frequency of its own send request, overall load on the system is still high. We could get around that by making one application devoted to caching these requests, but it is more natural to do this work in libvirt instead.

Thanks for your reply,
Dmitry

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to