[ovirt-users] Delay difference between queries (Python vs REST)
Nicolas Ecarnot
nicolas at ecarnot.net
Tue Jan 17 14:56:04 UTC 2017
Hello,
On a 3.6.5 DC, I'm trying to figure out how many VMs there are, using
two methods :
_*Python SDK :*_
*from ovirtsdk.xml import params
from ovirtsdk.api import API
api = API(url='https://engine.fqdn/ovirt-engine/api',
username='admin at internal', password='xxx', insecure=True)
print len(api.vms.list())*
time ./getMvm.py
62
real 0m23.016s
user 0m22.288s
sys 0m0.054s
_*REST :*_
*time curl -H "Version: 3" -H "Prefer: persistent-auth" -H "Filter:
false" -H "Accept: application/xml" -H "Content-Type: application/xml"
-k -u 'admin at internal:xxx' https://***engine.fqdn*/ovirt-engine/api/vms*
(Then grep or anything that would get the values from the xml returned.)
real 0m0.383s
user 0m0.036s
sys 0m0.038s
I am a beginner in both methods, but I would prefer play with Python.
I'm very surprised to have to wait more than 20 seconds to get an answer.
Looking at the engine log, I see that the authentication part is
finished after say 3 seconds, then 20 seconds with absolutely no error
message, no CPU load, no RAM burst, no nothing.
On the SPM, exactly triple null nothing nada niet void is obviously
explaining such a delay.
I'm wondering if this super hyper sluggishness is somewhat related to
the GUI global slowness I'm experiencing like other users since we left
3.2.x, and I would love that some oVirt ninja uses the comparison above
to tell what parts in oVirt is used or not that could explain such a
difference (database, access to SPM, LVM, network access, whatever...)
--
Nicolas ECARNOT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170117/d776f6c1/attachment.html>
More information about the Users
mailing list