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

Bug#409872: marked as done (On slow arch apt just wastes cpu while waiting for dpkg to run)



Your message dated Wed, 26 Nov 2008 15:11:26 +0200
with message-id <492D4AFE.8030706@gmail.com>
and subject line closing #409872
has caused the Debian Bug report #409872,
regarding On slow arch apt just wastes cpu while waiting for dpkg to run
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
409872: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409872
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.6.46.4
Severity: normal


I'm running apt from an nfs-mounted chroot of the real disk inside a 
qemu-system-arm instance. This is quite slow, but better than the real machine
(nslu2) which has infeasibly little memory (32MB) [When I was young...],
at least for modern big package databases.

However, I notice that while dpkg is running to decompress something,
apt is still taking about as much cpu as the dpkg instance. This is sad,
giving that all its doing is waiting.

strace reveals:
....
read(4, 0xbea58906, 1)                  = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 1000000}, NULL)           = 0
wait4(12980, 0xbea58758, WNOHANG, NULL) = 0
read(4, 0xbea58906, 1)                  = -1 EAGAIN (Resource temporarily unavailable)
nanosleep({0, 1000000}, NULL)           = 0
....

So its got a wait4 and a 1ms delay. A real ARM chip is a disaster on context 
switches (need to flush the cache - it uses virtual addresses.) I guess
qemu-ed it is as well.

So I guess I'm asking for this particular bit of code to be fixed to be a bit
more gentle. There shouldn't be much slowdown on faster arches, and it
could double the speed in this case. Maybe it could do a smart backoff
or something. Or indeed just 10ms instead of 1ms would be enough.

-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "arm";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Authentication "";
APT::Authentication::TrustCDROM "true";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Tools "";
DPkg::Tools::Options "";
DPkg::Tools::Options::/usr/bin/apt-listchanges "";
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";

-- (no /etc/apt/preferences present) --


-- /etc/apt/sources.list --

deb http://ftp.uk.debian.org/debian/ etch main
#deb http://debian.hands.com/debian/ sid main
#deb-src http://ftp.uk.debian.org/debian/ etch main

deb http://security.debian.org/ etch/updates main
#deb-src http://security.debian.org/ etch/updates main

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: arm (armv5tel)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-ixp4xx
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages apt depends on:
ii  debian-archive-keyring      2006.11.22   GnuPG archive keys of the Debian a
ii  libc6                       2.3.6.ds1-10 GNU C Library: Shared libraries
ii  libgcc1                     1:4.1.1-21   GCC support library
ii  libstdc++6                  4.1.1-21     The GNU Standard C++ Library v3

apt recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
Version: 0.7.7

I guess this is fixed in apt 0.7.7, as modern apt contains no any usleep's
while waiting for dpkg.

I am closing this bug now, please reopen if needed.

-- 
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
Ukrainian C++ Developer, Debian APT contributor

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply to: