0

My Ubuntu 10.04 server slowly eats up memory. If you look at tops, it slowly starts using swap space. Eventually the amount of free memory drops too low and the kernel kills the worst process.

A top on the server sorted by RES looks like this:

top - 20:39:41 up 30 days,  5:43,  1 user,  load average: 0.00, 0.01, 0.05
Tasks: 114 total,   1 running, 113 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    509424k total,   495236k used,    14188k free,    37876k buffers
Swap:   262140k total,   159184k used,   102956k free,   131312k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12210 amavis    20   0 68804  43m 3616 S    0  8.8   0:05.30 amavisd-new
12313 amavis    20   0 67480  40m 3252 S    0  8.2   0:03.54 amavisd-new
 2321 root      20   0 46572  24m  948 S    0  4.9   0:04.26 saslauthd
 2323 root      20   0 44988  24m  936 S    0  4.8   0:04.10 saslauthd
 2322 root      20   0 46440  23m  932 S    0  4.8   0:04.30 saslauthd
 2324 root      20   0 45780  23m  924 S    0  4.6   0:04.21 saslauthd
 2325 root      20   0 42880  22m 1016 S    0  4.5   0:03.91 saslauthd
 1991 mysql     20   0  138m  18m 2804 S    0  3.8  10:57.95 mysqld
 2201 amavis    20   0 64916  14m 2556 S    0  2.9   0:35.98 amavisd-new
18225 root      20   0 37644 9164 5052 S    0  1.8   0:27.51 apache2
29781 www-data  20   0 38772 8272 3216 S    0  1.6   0:00.22 apache2
...

My question is, how can I see what process is responsible for eating up memory? The largest program, MySQL, seems pretty OK with just 138m taken.

Andomar
  • 113
  • Sort it by the RES column, it's a better indication of memory usage. – Didi Kohen Mar 25 '13 at 19:37
  • @DavidKohen: Updated with a sort on RES column – Andomar Mar 25 '13 at 19:44
  • The question this is supposedly a duplicate of does not provide a solution to my problem. The RES column does not add up to the total memory used (including swap); I'd be interested to know where it is going. – Andomar Mar 25 '13 at 21:16

0 Answers0