[ejabberd] ejabberd increased memory needs since erlang update

Konstantin Khomoutov flatworm at users.sourceforge.net
Fri Jul 31 18:53:46 MSD 2009


defa wrote:

[...]
Package: ejabberd
[...]
Version: 2.0.5-1.1
Depends: adduser, erlang-nox (>= 1:13.b-dfsg1), erlang-abi-13.a, [...]
since that day i experience a significant increase of ram-usage on that 
machine. ejabberd is the only service running on that box. you can see 
the ram-usage in that munin-stat: 
http://acabyte.ath.cx/~defa/jabber-memory-week.png
[...]

To be honest, I don't understand this chart much, so let me propose 
another way to estimate the memory usage.

Memory leaks typically increase the size of the program's resident 
memory (RSS), so could you instead do this:

1) Start ejabberd afresh.

2) Locate the pid of its root process (via `ps axf -o pid,cmd` for 
instance) -- that will be 'beam' or 'beam.smp'.

3) Get its RSS segment size using
$ grep RSS /proc/$BEAM_PID/status

This number gives a rather honest estimation of how much memory the 
process really owns.

In the short term it can be watched using top/htop or
$ watch 'grep RSS /proc/$BEAM_PID/status'

I'm not sure if there are any readily available tools to save such 
samples to a file on a timely basis. May be a simple cron job appending 
the output of the grep encantation above to a text file would work.


More information about the ejabberd mailing list