On Thu, May 24, 2007 at 06:38:30PM +0200, Jan Michael wrote: > Hi Daniel, > > first I'd like to thank you for your speedy answer and the suggested > solution. But I think it doesn't fit to my problem. > The program I write is a sensor, which is executed by a given time > intervall. So I'm not able to cache the domain handles. > > But that rises another question in my mind. Till now I assumed that I > have to get a new domain handle to receive updated information > (cpuTime) from the domain, do I? Else I could avoid a second call to > get a second domain handle. I would say get the handles for the domains first and keep them for the sampling period yes. Each time you need to talk to xend this eats globs of CPU force execution on Domain-0 etc... ideally for the sampling period you should restrain yourself to call virNodeGetInfo() which (especially if run as root) should be a simple inexpensive hypercall. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/