Bug 836703 - RFE: switch to libvirt event APIs so virt-manager doesn't use >5% cpu even when idle
RFE: switch to libvirt event APIs so virt-manager doesn't use >5% cpu even wh...
Product: Virtualization Tools
Classification: Community
Component: virt-manager (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Cole Robinson
: 980393 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-06-30 00:39 EDT by Jens Petersen
Modified: 2014-02-11 15:45 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-11 15:45:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jens Petersen 2012-06-30 00:39:29 EDT
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):

How reproducible:

Steps to Reproduce:
1. start virt-manager
2. run top in a shell
Actual results:
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

Expected results:
<1% ?

Additional info:
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
Comment 1 Jens Petersen 2012-06-30 00:39:59 EDT
How can I provide more information?  strace?
Comment 2 Cole Robinson 2012-10-13 21:30:13 EDT
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.
Comment 3 Jens Petersen 2012-10-18 08:25:15 EDT
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
I believe.
Comment 4 Cole Robinson 2013-08-31 13:18:34 EDT
*** Bug 980393 has been marked as a duplicate of this bug. ***
Comment 5 Cole Robinson 2014-02-11 15:45:24 EST
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.

Note You need to log in before you can comment on or make changes to this bug.