[libvirt] [PATCH] Refresh QEMU driver caps in getCapabilities

Gerrit Slomma roadrunner_gs at web.de
Tue Apr 28 21:13:13 UTC 2009


Cole Robinson schrieb:
> (...)
>
> To test the performance impact, I used a simple python script:
>
> import libvirt
> conn = libvirt.open("qemu:///system")
> for i in range(0, 30):
>     conn.getCapabilities()
>
> The time difference was on average .02 seconds slower, which I think is
> negligible.
>
> If at somepoint in the future, capabilities generation becomes smarter
> (searching PATH emulators, scraping device list output, etc.) it might
> be worth re-checking the time impact. But for now it doesn't seem to be
> an issue.
>
> Thanks,
> Cole
>   
> ------------------------------------------------------------------------
>
> --
> Libvir-list mailing list
> Libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

.02 seconds slower compared to what time?
Without a given base this result doesn't say much.
It wouldn't matter if the execution-time was 3600 seconds prior to the 
change but would be a realt bottleneck if it was 0.01 seconds prior to 
the change.
I know a virsh capabilities is not that slow, but i haven't clocked it 
up to now but have done so now that i have read your post and got this 
on my machine:

rr016# time virsh capabilities
(...)
real    0m0.005s
user    0m0.001s
sys     0m0.002s

So the change would mean a 300% penalty. I could live with that because 
even with .02 seconds it is fast.

Gerrit




More information about the libvir-list mailing list