[ejabberd] Beam consumes > 400% CPU - why?

Sergej Pupykin ml at sergej.pp.ru
Mon May 14 17:46:41 MSK 2018


On Mon, 05 Mar 2018 16:52:53 +0300,
Holger Weiß wrote:
> 
> You could post the output of "etop -sort reductions" (press Ctrl+C twice
> to get out of etop).  Depending on how you installed Erlang/OTP, etop
> might not be in your PATH, or not even installed (e.g., on Debian,
> you'll need the package "erlang-observer", which installs etop into
> </usr/lib/erlang/lib/observer-*/priv/bin>).

I have similar problem and here is my etop output:

========================================================================================
 ejabberd at localhost                                                        14:38:28
 Load:  cpu        37               Memory:  total      627333    binary      20618
        procs     487                        processes  605895    code        23804
        runq        2                        atom         1009    ets          5967

Pid            Name or Initial Func    Time    Reds  Memory    MsgQ Current Function
----------------------------------------------------------------------------------------
<7088.856.0>   xmpp_stream_in:init/ 42405651212867258267032      15 re:precomp_repl/1   
<7088.972.0>   xmpp_stream_in:init/ 41659911210136258266232       5 re:precomp_repl/1   
<7088.728.0>   xmpp_stream_in:init/ 39570281138388554287760      22 re:precomp_repl/1   
<7088.499.0>   'mod_ping_dsr-corpor    4618   68798  176304       0 gen_server:loop/7   
<7088.82.0>    lager_event             6227    3769 9612312       5 gen:do_call/4       
<7088.704.0>   xmpp_stream_in:init/     339    1999 1803808       0 p1_server:collect_me
<7088.710.0>   xmpp_stream_in:init/     679    1952 7637584       0 p1_server:collect_me
<7088.52.0>    file_server_2            174     459   13936       0 gen_server:loop/7   
<7088.57.0>    user                     287     250    7216       0 user:server_loop/2  
<7088.418.0>   ejabberd_iq              161      70   13824       0 gen_server:loop/7   
========================================================================================

I disabled external connections using

iptables -I INPUT -p tcp --dport 5222 ! -s 192.168.52.0/22 -j DROP
iptables -I INPUT -p tcp --dport 5222 ! -s 192.168.52.0/22 -j DROP

but it does not help.

I started ejabberd with loglevel = 5 and see not much network activity
in logs as well as in "tcpdump -ni any port 5222".

ArchLinux, ejabberd 18.04-1, erlang 20.3.2-1.


More information about the ejabberd mailing list