checking trust of archives eats a lot of cpu
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Unattended-upgrades consumes tens of seconds or even minutes of CPU time to verify the origin of the packages
* Using excessive amount of CPU is unpleasant for desktop/laptop users and also wastes computation time on servers/cloud instances.
* Unattended-
[Test Case]
* The added upgrade-
* Please run autopkgtests and look for the to time results:
...
All upgrades installed
44.41user 3.06system 0:48.35elapsed 98%CPU (0avgtext+0avgdata 164872maxresident)k
208inputs+
...
No packages found that can be upgraded unattended and no pending auto-removals
2.83user 0.11system 0:02.98elapsed 98%CPU (0avgtext+0avgdata 79308maxresident)k
[Regression Potential]
* Due to algorithm redesign there is a risk that packages from allowed origins are not upgraded. There were unit tests for testing the selection of the right packages to upgrade already, but a new autopkgtest is also introduce to verify u-u's behavior on current real-life security-updates.
[Original bug text]
(System: Ubuntu 14.04, up to date packages)
I noticed that unattended-upgrades spends a significant amount of time in phases where it runs at 100% cpu. On a slower machine (core 2 t7200 2GHz) this goes on for minutes rather than seconds. This interferes with using the machine for other tasks.
Using the --debug option to unattended-upgrades shows that the program outputs a lot of lines like the following during these 100% cpu phases:
matching 'a'='trusty-
From this output I guess the operation executed is not so complicated that it should require so much cpu power. ??
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: unattended-upgrades 0.82.1ubuntu2
ProcVersionSign
Uname: Linux 3.13.0-40-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
Date: Wed Nov 26 21:53:57 2014
InstallationDate: Installed on 2014-08-28 (90 days ago)
InstallationMedia: Kubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.1)
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: unattended-upgrades
UpgradeStatus: No upgrade log present (probably fresh install)
Is there a generic bug or effort for the obtrusiveness of unattended- upgrades?