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

Evgeny Khramtsov xramtsov at gmail.com
Tue May 15 15:22:05 MSK 2018


Tue, 15 May 2018 14:16:14 +0300
Sergej Pupykin <ml at sergej.pp.ru> wrote:

> ========================================================================================
>  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
> ========================================================================================

According to the output all those c2s (or incoming s2s) processes are
computing some regular expression. I need to see detailed traceback of
one of those processes to say what regexp is calculated exactly and
from what piece of code. However, this requires more debugging.


More information about the ejabberd mailing list