[ejabberd] Erlang's default setting issue

Badlop badlop at gmail.com
Fri Dec 7 00:55:59 MSK 2007


2007/11/18, Max Loparyev <max at city.veganet.ru>:
> It seems like with default Erlang settings ejabberd's scalability
> limited by default settings and not by number of available file
> descriptors. By default we have ERL_MAX_PORTS of 1024, but as ejabberd
> uses from 2 to 3 ports for every socket in default environment ejabberd

Ah, right. I made this simple test:

ejabberd at startup:
> length(erlang:ports()).
21

Login one client, and check again:
> length(erlang:ports()).
24

Login another client and check again:
> length(erlang:ports()).
27


> capable to serve only half of 1024 sockets. So i think that this must be
> pointed somewhere in ejabberd docs that ERL_MAX_PORTS must be setted to
> x3 of number of open files for user running ejabberd process.

Ok, with your last suggestion and improvements, let's see how it's
described now in SVN.

The ejabberd guide, in the section '2.2.5 Start' [1] says:
  Please refer to the section 4.1 for details about ejabberdctl,
  and configurable options to fine tune the Erlang runtime system.

The section '4.1 ejabberdctl' [2] says:
  The ejabberdctl administration script can be configured in the
  file ejabberdctl.cfg. This file provides detailed information about
  each configurable option.

And when you read the file ejabberdctl.cfg [3], it says:

# ERL_MAX_PORTS: Maximum number of simultaneously open Erlang ports
#
# ejabberd consumes two or three ports for every connection, either
# from a client or from another Jabber server. So take this into
# account when setting this limit.
#
# Default: 1024
# Maximum: 268435456
#
export ERL_MAX_PORTS=32000


I hope that is enough ;)



[1] http://svn.process-one.net/ejabberd/trunk/doc/guide.html#htoc13
[2] http://svn.process-one.net/ejabberd/trunk/doc/guide.html#htoc57
[3] http://svn.process-one.net/ejabberd/trunk/src/ejabberdctl.cfg.example


More information about the ejabberd mailing list