Description of problem:
gpk-update-viewer causes a high CPU load while downloading packages
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. have a larger queue of updates (21 updates, ~170 MB)
2. run gpk-update-viewer to update your system
Top shows a load of ~20% while on an Intel Core 2 T5500 @ 1.66GHz. This is pretty much for just downloading some packages and showing nice animations. If you have a large number of updates, the system becomes unresponsive for the whole time of the download.
Downloading packages should not cause any notable CPU usage.
What process is causing the high CPU? I can't reproduce here.
As mentioned before: gpk-update-viwewer
Created attachment 360823 [details]
Screenshot showing gpk-update-viewer and it's CPU usage
Today the updates queue has 36 updates, which again caused a cpu usage of ~ 30%. I managed to get a screenshot with 34.8%. Seems to be related to the animations, because if the spinners are not in the part of the window that is shown, the load drops. Scrolling also increases the load dramatically.
Is this still relevant for the latest packages in F12? Thanks.
Yes, unfortunately it is.
Okay, I've tracked this one down, and randomly it's a PackageKit bug. PackageKit is supposed to send:
(start of transaction)
(end of transaction)
and GPK starts a spinner on the action, and stops it on the finished signal. To keep the spinners spinning, we setup a timer that finds the current row, gets the value, and increments it in a tree model.
For one update, this is a trivial amount of CPU. If you've got 50 pending updates, then you've got O(n^n) complexity (as it's only ever designed for 1 or two updates, not all of them) which really hurts the CPU.
The fix we just to correct a conditional in PkBackend, which causes the FINISHED signal to be sent at the correct time.
Author: Richard Hughes <firstname.lastname@example.org>
Date: Fri Mar 26 09:26:19 2010 +0000
Ensure the Package(finished) signal is always sent during the transaction. Fixes rh#522628
I'll build a new PK on Monday, and then attach the build to this bug.
Thanks a lot.
One more thing I have noticed: The load increases massively when one is scrolling in the window. Therefor if there are lots of small updates or cleanups that get applied very fast, it drives the load up.
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '11'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 11's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 11 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.