[ejabberd] Memory problems with TLS/SSL

Sean Dilda sean at duke.edu
Fri May 9 01:07:27 MSD 2008

Taylor Laramie wrote:
> Has anyone dealt with & resolved issues with TLS(SSL) connections and 
> memory consumption?
> I'm running benchmarks/stress tests on a replacement system for our 
> current ejabberd server and it seems the choke point when it comes to 
> max connections comes from the beam process running out of memory 
> (including swap). While the tests are intended to be more intensive then 
> our typical usage I've noticed a big difference between handling 
> encrypted & non-encrypted connections.
> For instance on a 4GB server with 2GB swap it will start paging on 5000 
> connections. On the same system (sans TLS) I can achieve 10000+ without 
> using half of the memory.
> Are there any suggestions or patches for reducing the memory consumption 
> or is this a known bug?

I'm not sure about 'known bug' but I'm seeing the same thing on ejabberd 
1.1.4 and 2.0.0.

For 2,000 SSL connections it'll take around 1GB of RAM.  For 2,000 
plaintext connections, it'll take around 150MB.  I'm seeing similar 
results for the old port 5223 tls and using starttls on port 5222.

More information about the ejabberd mailing list