[ejabberd] 700kb of RAM per connection

Anton Belyaev anton.belyaev at gmail.com
Fri Jan 23 15:38:02 MSK 2009

2009/1/23 George Hazan <george.hazan at gmail.com>:
>  Hello, Anton!
>  Fri, 23 Jan 2009 02:36:49 +0300 you wrote:
> AB> I tried to connect 600 idle users (just connect and authenticate) to
> AB> my ejabberd instance and found out that the process eats 400 mb of RAM
> AB> + virtual.
> AB> For 300 users it takes about 210 mb. For 0 users online ejabberd takes <
> AB> 30 mb.
> AB> What could be the reason for such a behavior?
> Connect to the ejabberd console and type in
> 1>erlang:memory().
> You will see how much RAM is occupied by processes, so you will be able to
> calculate the amount of RAM used by a single process more correctly.

erlang:memory() shows 34 megabytes, but top command shows higher
values (400 and 200 mb). This is strange.

The culprit was starttls. With plain connection there is moderate
memory consumption. Both erlang:memory() and top show approximately
the same value.


More information about the ejabberd mailing list