Red Hat Bugzilla – Bug 474492
yumbackend.py likes to take all my CPU power
Last modified: 2014-01-21 18:07:14 EST
Description of problem:
I just was watching top when my system got very slow.
It turned out that yumbackend.py was using all resources that where left!
Version-Release number of selected component (if applicable):
current version in Fedora 10:
Steps to Reproduce:
yumbackend.py started running to do.. something.. and to get silent after again after a few second of taking all my resources
i shouldn't notice yumbackend.py! it shouldn't be noticable that yum is doing something in the background.
This is probably not a bug but just programmed to do something lets say once a hour. There probably isn't a CPU limit set on yumbackend.py. My CPU is a intel dual core T5200 1.6 GHz (acer aspire 5630 notebook)
I would like to suggest to let yumbackend.py ONLY run when the system is using few resources or is idle. Also i would like to suggest that yumbackend.py is limited to a max of 20% of cpu power. I have no clue how you can do something like that but it should (right?) be possible in python.
Not really reassinging but asking for input.
Does it make sense to nice-out the time that any of the pk backends get?
I guess what the reporter is experiencing is either the auto-get-updates or maybe the auto-cache-refresh code, although the latter is unlikely as that only happens when idle for a while.
I don't think it makes sense to kill a job just because it's taking a long time, although I do think it would be good to CPU limit this check if possible. I don't know how to do that in python.
For more info (in case that wasn't clear) i'm using a fairly default fedora installation + the rpmfusion repo. i haven't changed any yum settings. The install was from the Fedora DVD (not the live CD)
@richard, i have no idea which one of "auto-get-updates" and "auto-cache-refresh".. is there any yum log somewhere where i can check that? the yum.log file is not telling me anything about yumbackend.py
yumbackend is run from PackageKit, to interface with yum. You can get all the details about what was done, why whom, and why, by doing this command "pkcon get-transactions"
this produces a few screenfulls of:
System time: 2008-12-03T08:37:22.786753Z
Duration: 599 (seconds)
Command line: gpk-update-viewer
User ID: 500
Real name: Richard Hughes
- downloading samba-client-3.2.5-0.23.fc10.i386
- updating selinux-policy-3.5.13-26.fc10.noarch
- updating selinux-policy-targeted-3.5.13-26.fc10.noarch
- updating samba-3.2.5-0.23.fc10.i386
- updating libsmbclient-3.2.5-0.23.fc10.i386
- cleanup samba-common
- cleanup wine-ldap
- cleanup gtkhtml3
- cleanup qt-x11
I'm getting a strange output..
My last "transaction" was according to the line you gave me:
[mark@localhost ~]$ pkcon get-transactions
Transaction : /6_abbbdbeb_data
timespec : 2008-12-02T01:28:59.262586Z
succeeded : 1
role : install-packages
duration : 0 (seconds)
data : downloading tinyxml;2.5.3-3.fc9;x86_64;fedora A simple, small, C++ XML parser
downloading wxBase;2.8.9-1.fc10;x86_64;fedora Non-GUI support classes from the wxWidgets library
downloading filezilla;126.96.36.199-1.fc10;x86_64;updates FileZilla FTP, FTPS and SFTP client
downloading wxGTK;2.8.9-1.fc10;x86_64;fedora GTK2 port of the wxWidgets GUI library
installing wxBase;2.8.9-1.fc10;x86_64;fedora Non-GUI support classes from the wxWidgets library
installing wxGTK;2.8.9-1.fc10;x86_64;fedora GTK2 port of the wxWidgets GUI library
installing tinyxml;2.5.3-3.fc9;x86_64;fedora A simple, small, C++ XML parser
installing filezilla;188.8.131.52-1.fc10;x86_64;updates FileZilla FTP, FTPS and SFTP client
Which is not right. The transaction itself is fine but there should be more. i did a yum -y install updates yesterday which downloaded and installed for about 170 MB of updates but that's nowhere to be found in the transactions. All other transactions are from last month (november)
Author: Adel Gadllah <email@example.com>
Date: Wed Dec 17 17:55:22 2008 +0100
Don't let spawned backends hog the disk by default
:100644 100644 d94ce75... 56c8836... M etc/PackageKit.conf.in
:100644 100644 601ed7d... 4553a21... M src/pk-spawn.c
:000000 100644 0000000... c2b9e96... A src/pk-sysdep.c
:000000 100644 0000000... c453e29... A src/pk-sysdep.h
I've got an issue where I execute "yum update" after "yum check-update" and yum appears to hog all the computer resources, the hard disk starts thrashing, and the user is locked out of normal Gnome window functions such as scrolling, opening new applications, switching virtual terminals, etc.
Upon examination with gnome-system-monitor, one sees that the kernel and user cpu use is minimal to moderate, in the 10%-30% range, but the IO waits are between 70% and 90%. This is using the panel display of gnome-system-monitor. There is no network activity at this time. The problem occurs regardless of whether you use yum from the command line or PackageKit from Gnome. The problem occurs regardless of whether you're installing or removing packages.
Some data -
Host: Windows XP SP3
VM: VMware 7
Client: Fedora 12