[ejabberd] Ejabberd Memory Consumption (SSL & Compression)

Chris Moos chris at tech9computers.com
Sat Mar 5 10:02:39 MSK 2011

Evgeniy Khramtsov <xramtsov <at> gmail.com> writes:

> 05.03.2011 12:16, William Key wrote:
> > Hello all,
> >
> > I noticed Erlang was reporting very low memory usage while the OS was
> > showing it was 2-3x that. When looking through the patch notes I noticed a
> > few changes which allow Erlang to report the memory usage by the C modules.
> > After upgrading from Ejabberd 2.1.2 to Ejabberd 2.1.6 Erlang was reporting
> > the memory usage correctly. Suddenly the system allocation became extremely
> > high. We upgraded from R13-B3 to R14-B1 and noticed a the memory drop down
> > to around 450kb per connection which still seems really high. It seems to be
> > the C modules using up a lot of memory. The server is using old-style SSL
> > (port 5223) and compression for all connections which would add more
> > overhead. Has anyone else experienced this problem?
> This is a well-known problem. We have no idea how to make openssl eat 
> less memory. We did a lot of things, but mostly with no effect.
> Recently, some improvements have been done in TLS code, but it requires 
> openssl 1.0.x and later. What version of openssl are you using?


I noticed that in OpenSSL 1.0.0 there is the following change:

*) New option SSL_OP_NO_COMP to disable use of compression selectively
     in SSL structures. New SSL ctrl to set maximum send fragment size. 
     Save memory by seeting the I/O buffer sizes dynamically instead of
     using the maximum available value.
     [Steve Henson]

Any idea how much overhead the compression structures add? 

More information about the ejabberd mailing list