Red Hat Bugzilla – Bug 836703
RFE: switch to libvirt event APIs so virt-manager doesn't use >5% cpu even when idle
Last modified: 2014-02-11 15:45:24 EST
Description of problem:
For a long time now I have noticed virt-manager seems to use
5% of my CPU continuously whether a guest is running or not.
That seems too much for an idle process.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. start virt-manager
2. run top in a shell
11161 petersen 20 0 790m 51m 13m S 6.6 0.7 0:09.68 /usr/bin/python /usr/share/virt-manager/virt-manager.py
720 root 20 0 1016m 16m 4236 S 4.0 0.2 558:50.50 /usr/sbin/libvirtd
This has been happy as long as I can remember -
at least for quite a few releases I believe.
If this is a general problem for everyone
then that is a lot of wasted cpu cycles and energy.
Dunno if it is related but powertop says:
Power est. Usage Events/s Category Description
20.9 W 0.0 pkts/s Device nic:virbr0
How can I provide more information? strace?
virt-manager is notoriously a hog, because it polls tons of libvirt info. But if there was a noticeable change we might be doing something wrong, occasionally we regress somewhere and end up fetching domain XML on every tick period when we should be lazily updating it.
Jens, are you still seeing this with latest F17 virt-manager? It's been bumped a few times since this was filed.
Yes, I am afraid so - I noticed it again this morning...
Trying now I see virt-manager is using about 8%
and libvirtd 5.5% - no guests are running.
Probably no regression - it has been happening for long anyway
*** Bug 980393 has been marked as a duplicate of this bug. ***
Upstream uses domain events now, and has been audited to cut down as much polling as possible. It can be reduced even further than the default by disabling CPU polling in edit->preferences.