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

Sergej Pupykin ml at sergej.pp.ru
Tue May 15 14:16:14 MSK 2018


On Mon, 14 May 2018 17:46:41 +0300,
Sergej Pupykin wrote:
> 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   
> ========================================================================================
> 

Also

"netstat -tnp|grep beam|wc -l" always returns 82 connections

I cannot stop ejabberd using systemctl in reasonable time. I need to
"kill -9".

Sometimes beam.smp killed by OOM.

Another etop output:

========================================================================================
 ejabberd at localhost                                                        11:16:19
 Load:  cpu        80               Memory:  total     2604356    binary      94321
        procs     502                        processes 2315573    code        23804
        runq       20                        atom         1009    ets          5092

Pid            Name or Initial Func    Time    Reds  Memory    MsgQ Current Function
----------------------------------------------------------------------------------------
<7088.716.0>   xmpp_stream_in:init/ 183096411332602  426664       0 lager_trunc_io:alist
<7088.1436.0>  xmpp_stream_in:init/ 1331628 409224458267112      16 re:precomp_repl/1   
<7088.1729.0>  xmpp_stream_in:init/ 1405738 376420481766968       8 re:precomp_repl/1   
<7088.1797.0>  xmpp_stream_in:init/ 1376540 372618458266552       9 re:precomp_repl/1   
<7088.1115.0>  xmpp_stream_in:init/ 1204057 370295079735112      25 re:precomp_repl/1   
<7088.1482.0>  xmpp_stream_in:init/ 1359699 364451680828344      19 re:precomp_repl/1   
<7088.1589.0>  xmpp_stream_in:init/ 1328053 363389281128552      18 re:precomp_repl/1   
<7088.937.0>   xmpp_stream_in:init/ 1124572 344317078862536      21 re:precomp_repl/1   
<7088.1657.0>  xmpp_stream_in:init/ 1297572 337920581438376       7 re:precomp_repl/1   
<7088.1012.0>  xmpp_stream_in:init/ 1191781 335726079366312      18 re:precomp_repl/1   
========================================================================================


More information about the ejabberd mailing list