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

Bug#245970: dpkg: [PERF] unpacking packages extremely slow on systems with <= 64 MB memory

Package: dpkg
Version: 1.10.21
Severity: normal

Hello dpkg developers,

For some time now dpkg is really slow on a 200 MHz AMD k6 with 64 MB
memory. On a 1.4 GHz Athlon with 768 MB it runs fine. The difference is
much more than what could be attributed to difference in processor
speeds, so I believe memory is the main issue here. A dpkg process
easily uses > 30 MB. The unpacking phase is the worst, and by profiling
I found three points in process_archive() in processarc.c that take the
most time:

- the clear_istobes() call takes about 10 seconds
- the parsedb() call, this takes a lot of time the first time it is run
  (because it actually has to read and parse the entire database), but
  subsequent calls also take a few seconds.
- the check for disappearing packages also takes about 10 seconds

All those things involve looping over the entire packagelist. If the
pacakge list cannot be kept in RAM at all times, this will cause
swapping to/from disk and a big slowdown. If there are ways to remove
the need to loop over all packages or to defer certain things until all
packages have been unpacked, it would greatly improve dpkg's speed.

The numbers above are not exact, and the severity of this bug is normal
but change it as you see fit.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i586)
Kernel: Linux 2.6.3
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8

Versions of packages dpkg depends on:
ii  dselect                     1.10.21      a user tool to manage Debian packa
ii  libc6                       2.3.2.ds1-12 GNU C Library: Shared libraries an

-- no debconf information

Reply to: