Supervisor - Performance improvement for dynamic workers

This patch improves performance of the Erlang/OTP supervisor behaviour for application using a large number of dynamic workers.
The list of dynamic children is manage with an Erlang dictionary (dict module) instead of an Erlang list.

The patch has been tested against Erlang/OTP from version R10B-7 to R10B-10: Erlang/OTP supervisor dict patch.

This patch has been used on production systems. Applied to an ejabberd installation, it lowers CPU consumption for systems where a lot of users are connected and where connections and disconnections rate is quite high. It limits the case of crashes due to excessive memory allocation.

The patched version are also available:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 09, 2008

    Anonymous says:

    We are seeing similar errors using the installer for 2.0.0 rc1 on Linux ejabberd...

    We are seeing similar errors using the installer for 2.0.0 rc1 on Linux
    ejabberd-2.0.0-rc1-linux-x86-installer.bin

    "erl -v" shows the version as 5.5.5
    Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [kernel-poll:false]

    The installer installs a supervisor.beam file with the following information:
    filesize: 8100 location: /opt/ejabberd-2.0.0/lib/stdlib-1.14.5/ebin/supervisor.beam

    the latest supervisor.beam file seems to be:
    filesize: 13960
    However, the patch file (located at http://support.process-one.net/doc/display/CONTRIBS/Supervisor+-+Perform...) has a date of May 07,2006 (Added by Mickaël Rémond, last edited by Mickaël Rémond on May 07, 2006 (view change))
    It also references R10B-7 to R10B-10 which I believe is erl 5.4.x

    Is the supervisor.beam installed with the 2.0.0-rc1 installer the most recent and correct for this version?
    Also, is it being used by erl or do I need to change some settings for it to get used?

  2. Feb 09, 2008

    Anonymous says:

    This patch is not needed anymore with Erlang/OTP R11B. The patch has been added ...

    This patch is not needed anymore with Erlang/OTP R11B. The patch has been added to Erlang code base.
    Erlang R11B is now the recommended Erlang version to run ejabberd.

    1. Feb 09, 2008

      Anonymous says:

      The installer installs the following Erlang (shown with "erl -v") Erlang (...

      The installer installs the following Erlang (shown with "erl -v")

      Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [kernel-poll:false]

      How does this translate to the R11B numbering or am I looking in the wrong place?

      thanks.

      1. Feb 10, 2008

        Mickaël Rémond says:

        Yes, it is Erlang/OTP R11.

        Yes, it is Erlang/OTP R11.

Add Comment