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

Bug#232984: apt-get space useage estimates appear over-optimistic



Package: apt
Version: 0.5.21
Severity: minor

Over at least the last month I've noticed the estimates apt-get gives
for space useage after installs or upgrades appear suspiciously
optimistic.  In one case I recall it told me that several MB would be
freed after upgrading a bunch of packages and removing none.  Of
course, this is possible, but it's happening enough I thought I'd
check more closely.  In my latest install, it said 2MB would be used,
and it appears at least 3MB were.

Before:
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda9               256667     80920    162495  34% /
/dev/hda6              6846744   5489932   1078568  84% /usr
/dev/evms/scratch      4570988   3552032   1018956  78% /evms/scratch
/dev/evms/var           409576    345256     64320  85% /var
/dev/evms/home         1843132   1718620    124512  94% /home
/dev/evms/share        1638340   1434096    204244  88% /usr/share
/evms/scratch/apt-cache
                       4570988   3552032   1018956  78% /usr/var/cache/apt
/evms/scratch/local/download
                       4570988   3552032   1018956  78% /usr/local/download
/evms/scratch/kde3     4570988   3552032   1018956  78% /usr/local/src/kde3
tmpfs                   193328         0    193328   0% /dev/shm

Note that mount -bind is being done for the dirs at the bottom
targetting /evms/scratch.

During:
# apt-get -q dist-upgrade
Reading Package Lists...
Building Dependency Tree...
The following packages have been kept back:
  hylafax-client
The following packages will be upgraded:
  cpp-3.3 cpp-3.3-doc cvs g++-3.3 g77-3.3 gcc-3.3 gcc-3.3-base
gcc-3.3-doc gobjc-3.3 libacl1 libattr1 libg2c0 libgcc1
  libio-stringy-perl libmime-perl libobjc1 libstdc++5
libstdc++5-3.3-dev libstdc++5-3.3-doc maxima
20 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/19.4MB of archives.
After unpacking 2077kB of additional disk space will be used.



After:
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda9               256667     80986    162429  34% /
/dev/hda6              6846744   5492900   1075600  84% /usr
/dev/evms/scratch      4570988   3552032   1018956  78% /evms/scratch
/dev/evms/var           409576    345288     64288  85% /var
/dev/evms/home         1843132   1718632    124500  94% /home
/dev/evms/share        1638340   1434168    204172  88% /usr/share
/evms/scratch/apt-cache
                       4570988   3552032   1018956  78%
/usr/var/cache/apt
/evms/scratch/local/download
                       4570988   3552032   1018956  78%
/usr/local/download
/evms/scratch/kde3     4570988   3552032   1018956  78%
/usr/local/src/kde3
tmpfs                   193328

This is on a single-user system that was not connected to the internet
(i.e., no mail) during the session.

Despite the projected 2077kB to be used, /usr alone grew by about 3Mg,
with a bit of growth in / and /var as well.


Here's the example with the big free, from Feb 12:
# apt-get -q dist-upgrade

Reading Package Lists...

Building Dependency Tree...

The following packages will be REMOVED:

  libevms-2.1

The following NEW packages will be installed:

  gnuhtml2latex latex-xft-fonts libevms-2.2 libgksu0 wv

The following packages have been kept back:

  hylafax-client

The following packages will be upgraded:

  base-config bash bash-doc bind bind-doc console-tools cron debian-el
debview defoma defoma-doc dfontmgr e2fslibs e2fsprogs evms

  evms-cli evms-gui evms-ncurses gcl gcl-doc gkrellm gkrellm-common
gksu kdeartwork-theme-window kernel-patch-xfs libblkid1

  libcomerr2 libconsole libcurl2 libevms-dev libgnutls7 libgnutls7-dev
libgsm1 libltdl3 libqt3c102-mt-mysql libqt3c102-mt-odbc

  libqt3c102-mt-psql libsdl-gfx1.2 libsmbclient libsmbclient-dev
libss2 libtool libtool-doc libuuid1 libxml2 libxml2-dev

  libxml2-utils lsbdev-guide lyx lyx-common lyx-qt nethack-common
nethack-x11 psfontmgr pump qt3-doc samba samba-common samba-doc

  sgml-data smbclient smbfs swat uuid-dev xml-core xmms

66 upgraded, 5 newly installed, 1 to remove and 1 not upgraded.

Need to get 0B/56.6MB of archives.

After unpacking 12.6MB disk space will be freed.

After this /usr had 5471044kB in use.  My best estimate is that it had
5514576-28500= 5486076 before, so for a fall of 15MB, so perhaps
that's OK.  Unfortunately, the 28.5MB is itself from an apt-get
estimate (for removing kernel-source-2.4.21; it sounds about right),
and there may have been other stuff going on.

So I'm not sure there's a problem, but I wanted to flag this issue in
case there is.  It may also be that the estimates are another packages
responsibililty (dpkg?), but this is where I'm seeing the problem.


-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Default-Release "testing";
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 "/usr/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::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";
DPkg::Post-Invoke "";
DPkg::Post-Invoke:: "test -f /var/run/zope.restart && invoke-rc.d zope restart ; rm -f /var/run/zope.restart";
DPkg::Post-Invoke:: "if [ -x /usr/sbin/localepurge ] && [ $(ps w -p $PPID | grep -c remove) != 1 ]; then /usr/sbin/localepurge; else exit 0; fi";
DSelect "";
DSelect::Clean "auto";

-- /etc/apt/preferences --

Explanation: Try to prevent unstable from creeping in
Package: *
Pin: release a=unstable
Pin-Priority: 50

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

deb file:/var/cache/apt-build/repository apt-build main
# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed throught the apt-cdrom tool.
# Proxy configuration is covered through environment variables or
#

### security ###
deb http://security.debian.org/ woody/updates main contrib non-free


###testing###
deb http://http.us.debian.org/debian testing main contrib non-free
deb http://non-us.debian.org/ testing/non-US main non-free contrib

# recommended in mozilla notes
#deb ftp://ftp.tux.org/pub/java/debian unstable main non-free
# but need gcc 3.2 versions
deb http://jopa.studentenweb.org/debian ./

# and for some AV stuff (mplayer)
deb ftp://ftp.nerim.net/debian-marillat/ testing main
deb-src http://perso.wanadoo.fr/debian/ unstable main

###Ximian/Helix###
#deb file:/usr/local/download/Helix woody main
#deb-src file:/usr/local/download/Helix woody main
#deb http://red-carpet.ximian.com/debian stable main
#deb-src  http://red-carpet.ximian.com/debian stable main

###unstable###
deb http://http.us.debian.org/debian unstable main
deb-src http://http.us.debian.org/debian unstable main contrib non-free
deb-src http://non-us.debian.org/  unstable/non-US main non-free contrib


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux wheat 2.4.21advncdfs #1 Wed Sep 17 22:06:42 PDT 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages apt depends on:
ii  libc6                      2.3.2.ds1-11  GNU C Library: Shared libraries an
ii  libgcc1                    1:3.3.3-0pre3 GCC support library
ii  libstdc++5                 1:3.3.3-0pre3 The GNU Standard C++ Library v3

-- no debconf information




Reply to: