Poor performance while "Calculating changes"

Bug #852128 reported by Ondřej Buriánek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

I've found performance issue in Distribution Upgrade -> phase Setting new software channels -> Calculating the changes....
Writing in
  * /var/log/dist-upgrade/apt.log
is IMHO done char by char.

When mounting
  * sudo mount -t tmpfs -o size=256M tmpfs /var/log/dist-upgrade
upgrade is much faster.

I found this inconvenience while upgrading Natty to Oneiric with broken dependencies. Upgrade couldn't solve manually installed ia32-libs with nspluginwrapper. When I was watching
  * tail -f /var/log/dist-upgrade/apt.log
characters were added slowly one by one. Writing 42KB log shouldn't take almost a minute :).

Test results committed afterwards:

Conflicted on HDD 1min+
Conflicted on RAM 16sec

Successful on HDD 28sec
Successful on RAM 12sec

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: update-manager 1:0.150.3
ProcVersionSignature: Ubuntu 2.6.38-11.49-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Fri Sep 16 20:39:48 2011
GConfNonDefault:
 /apps/update-manager/check_new_release_ignore=
 /apps/update-manager/first_run=false
 /apps/update-manager/show_details=true
 /apps/update-manager/window_size=(600,600)
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
PackageArchitecture: all
SourcePackage: update-manager
UpgradeStatus: Upgraded to natty on 2011-09-16 (0 days ago)

Revision history for this message
Ondřej Buriánek (zerem) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

Per mvo, this is probably in the apt code rather than in update-manager itself, since these are apt logs

affects: update-manager (Ubuntu) → apt (Ubuntu)
Revision history for this message
Michael Vogt (mvo) wrote :

It turns out that u-m was writing the log for this in O_SYNC mode, which is a bit silly as this data is really not important enough to justify this.

Changed in apt (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
status: New → In Progress
importance: Undecided → Medium
affects: apt (Ubuntu) → update-manager (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.152.19

---------------
update-manager (1:0.152.19) oneiric; urgency=low

  * DistUpgrade/DistUpgradeCache.py:
    - do not use O_SYNC for the apt.log, its not important enough
      to justify the slowdown (LP: #852128)
 -- Michael Vogt <email address hidden> Wed, 21 Sep 2011 17:55:53 +0200

Changed in update-manager (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.