Description of problem:
libvirt has many APIs to query the statistics of a domain, for example virDomainGetInfo, virDomainBlockInfo.
All these API are synchronous. Thus, a client application, like VDSM, needs to spawn a thread per Domain/VM in order to run all the queries.
This leads to waste of resources like the one found in https://bugzilla.redhat.com/show_bug.cgi?id=1102147#c54
We need a way to do async queries in order to reduce the number of active threads. This is to save resources, not for performance.
Affected APIs as in vdsm 4.15 / oVirt 3.5.0:
and their python counterpart
from the list on https://bugzilla.redhat.com/show_bug.cgi?id=1113106#c1
virDomainGetMetadata can be elided once https://bugzilla.redhat.com/show_bug.cgi?id=1114492 is fixed
For now it looks like the normal bulk stats API is sufficient. If it proves necessary to provide the async one please reopen this BZ.