Bug 836703 - RFE: switch to libvirt event APIs so virt-manager doesn't use >5% cpu even when idle
Summary: RFE: switch to libvirt event APIs so virt-manager doesn't use >5% cpu even wh...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
: 980393 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-30 04:39 UTC by Jens Petersen
Modified: 2014-02-11 20:45 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-11 20:45:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Jens Petersen 2012-06-30 04:39:29 UTC
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):
(virt-manager-0.9.1-4.fc17)

How reproducible:
100%?

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 04:39:59 UTC
How can I provide more information?  strace?

Comment 2 Cole Robinson 2012-10-14 01:30:13 UTC
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 12:25:15 UTC
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 17:18:34 UTC
*** Bug 980393 has been marked as a duplicate of this bug. ***

Comment 5 Cole Robinson 2014-02-11 20:45:24 UTC
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.