Dariusz on Software Quality & Performance

19/12/2009

Aptitude vs apt-get memory usage on Debian

Filed under: en — Tags: , , — dariusz.cieslak @

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

1 Comment »

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

    Comment by Jannich — 30/12/2009 @

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress