Re: packagekitd Hogging CPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 21, 2021 at 7:18 AM Tim Evans <tkevans@xxxxxxxxxxx> wrote:
>
> $ uname -a
> Linux harrier 5.12.11-300.fc34.x86_64 #1 SMP Wed Jun 16 15:47:58 UTC
> 2021 x86_64 x86_64 x86_64 GNU/Linux
>
> As I sit here, my Lenovo T530 laptop is reporting packagekitd is taking
> anywhere from 20 to 40 percent of CPU, per 'top.'  There is continuous
> disk activity. Nothing going on with the system other than Thunderbird
> e-mail and Chrome browser.
>
> This seems to go on, with CPU percentage growing over time, and it
> rebooting cures this, but it comes back after the system has slept
> overnight (lid closed).

PackageKit and dnf keep separate metadata in /var/cache and they
update periodically. PackageKit seems to do this on login, but I've
also noticed it trigger an update when I switch networks. And dnf is
on a timer. Either of them can use a lot of cpu, it just depends on
how much updating they need.

Recently I've been experimenting with cgroups to restrict the amount
of cpu packagekit gets via the packagekit.service unit. i.e. this is a
service unit specific restriction, not on all instances of packagekit.
Thus it doesn't affect offline updates, where it can still use 100%
cpu if need be. But, it's possible GNOME Software could be a bit
slower since it uses packagekit, though I haven't noticed any ill
effect so far.

$ sudo systemctl edit packagekit.service

Read the file that appears and insert these two lines where it says to:

[Service]
CPUQuota=25%

Save it out, and when the unit restarts (logout and login or do the
daemon-reload followed by service restart dance) you'll see packagekit
uses this value as a maximum.

-- 
Chris Murphy
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux