Description of problem: From https://www.redhat.com/archives/libvir-list/2017-September/msg00107.html: Would it be possible to allow querying memory statistics over domainListGetStats as well in one operation? Currently <nr-of-domains> calls from Python are needed to fetch memory statistics for all guests which may be a bit costly in larger environments. All other statistics are already available over domainListGetStats.
Since we need support for this in libvirt firstly I'm switching component. Libvirt-python will pick this up then too.
Marko, I've just noticed that we have balloon stats that cover the memory stats too: virsh # domstats --balloon fedora Domain: 'fedora' balloon.current=4194304 balloon.maximum=4194304 balloon.swap_in=0 balloon.swap_out=0 balloon.major_fault=245 balloon.minor_fault=75455 balloon.unused=3845540 balloon.available=4018564 balloon.usable=3759644 balloon.last-update=1504774536 balloon.rss=123164 Which produces the same result as dommemstat: virsh # dommemstat fedora actual 4194304 swap_in 0 swap_out 0 major_fault 245 minor_fault 75455 unused 3845540 available 4018564 usable 3759644 last_update 1504774536 rss 123164 Do you think that is enough for you? Sorry for not spotting this earlier.
(In reply to Michal Privoznik from comment #2) > Marko, I've just noticed that we have balloon stats that cover the memory > stats too: > > virsh # domstats --balloon fedora > Domain: 'fedora' > balloon.rss=123164 > > Which produces the same result as dommemstat: > > virsh # dommemstat fedora > rss 123164 Right, and this is also implemented in PCP already: # pmrep -p -s 3 libvirt.domstats.mem.rss,memory libvirt.domstats.balloon.rss,balloon memory balloon a6e32e a6e32ea Kbyte Kbyte 14:16:21 459840 459840 14:16:22 482276 482540 14:16:23 596060 596060 > Do you think that is enough for you? Sorry for not spotting this earlier. For all practical purposes, probably yes. Is the plan to make everything available over balloon stats that will be available over memory stats? The only case I can think of in favor of implementing this is that people e.g. with PCP merely request all "libvirt" metrics rather than spelling out subsections so then inadvertently hitting the slow code path. But that's probably more a documentation issue. IOW, ideally all stats would be available using the more efficient domainListGetStats but I won't protest if that is deemed unnecessary for these kind of duplicated stats and this RFE is closed. Thanks.
(In reply to Marko Myllynen from comment #3) > (In reply to Michal Privoznik from comment #2) > > Marko, I've just noticed that we have balloon stats that cover the memory > > stats too: > > > > virsh # domstats --balloon fedora > > Domain: 'fedora' > > balloon.rss=123164 > > > > Which produces the same result as dommemstat: > > > > virsh # dommemstat fedora > > rss 123164 > > Right, and this is also implemented in PCP already: > > # pmrep -p -s 3 libvirt.domstats.mem.rss,memory > libvirt.domstats.balloon.rss,balloon > memory balloon > a6e32e a6e32ea > Kbyte Kbyte > 14:16:21 459840 459840 > 14:16:22 482276 482540 > 14:16:23 596060 596060 > > > Do you think that is enough for you? Sorry for not spotting this earlier. > > For all practical purposes, probably yes. Is the plan to make everything > available over balloon stats that will be available over memory stats? > > The only case I can think of in favor of implementing this is that people > e.g. with PCP merely request all "libvirt" metrics rather than spelling out > subsections so then inadvertently hitting the slow code path. But that's > probably more a documentation issue. IOW, ideally all stats would be > available using the more efficient domainListGetStats but I won't protest if > that is deemed unnecessary for these kind of duplicated stats and this RFE > is closed. Yes, we realize the importance of the domainListGetStats API therefore all the stats should be available there. If not, we can certainly fix that. Thanks.