Aptitude vs apt-get memory usage on Debian

If you are administering small-memory VPS servers it's very easy to exceed all available memory. Typical memory hogs (apache mpm-prefork, rsyslogd) could be easily replaced by alternatives. It's not very easy to do with packaging system (you have to be up to date with security updates).

I compared memory usage of two APT interfaces: apt-get and (new, now prefferred) aptitude. Here are the results (top output when command shows list of packages to install):

# apt-get install munin
----------------------------
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
28800 root      20   0 15940  13m  10m T    0 10.3   0:00.44 apt-get
# aptitude install munin
----------------------------
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
28822 root      20   0 40936  33m  12m T    0 26.3   0:00.92 aptitude

As you can see aptitude uses almost 3x more memory than apt-get (VSZ and RSZ). If you are low on memory on low-end box it's noteworthly saving.

Note: tests were done on 32-bit OpenVZ-based VPS.

debian

This entry was posted in en and tagged , , . Bookmark the permalink.

One Response to Aptitude vs apt-get memory usage on Debian

  1. Jannich says:

    Interesting.. I think I'll stick to apt-get on the vps's then. :-)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>