ejabberd - Comments for "CPU usage very high/epoll" https://www.ejabberd.im/node/11121 en Using etops I see that the https://www.ejabberd.im/node/11121#comment-60121 <p>Using etops I see that the pubsub module is processing a very large MsgQ. This is due to a bug we had in our client that was causing new subscriptions to be made on each launch of the client. We are in the process of getting those clients to desubscribe. </p> <p>Question is why is CPU fixed at around 1 full CPU? This doesnt seem to go up or down much. How can I get it to process this queue faster?</p> <p>========================================================================================<br /> 'ejabberd@prod-xmpp-barker0.prod.djrd.dowjones.net' 13:14:25<br /> Load: cpu 117 Memory: total 2338890 binary 24916<br /> procs 2155 processes 1822205 code 15571<br /> runq 1 atom 549 ets 441591</p> <p>Pid Name or Initial Func Time Reds Memory MsgQ Current Function<br /> ----------------------------------------------------------------------------------------<br /> &lt;5591.245.0&gt; proc_lib:init_p/5 '-' 1860068 29872 0 dets:open_file_loop2<br /> &lt;5591.501.0&gt; ejabberd_mod_pubsub_ '-' 51033022445928 0 gen_server:loop/6<br /> ***************proc_lib:init_p/5 '-' 219408 460048 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 143353 4119712 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 143053 689576 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 133426 514232 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 128552 426560 0 prim_inet:recv0/3<br /> &lt;5591.511.0&gt; ejabberd_mod_pubsub_ '-' 127139******** 62378 dets:req/2<br /> ***************proc_lib:init_p/5 '-' 113503 4720688 0 gen:do_call/4<br /> ***************proc_lib:init_p/5 '-' 97313 284704 0 prim_inet:recv0/3<br /> ========================================================================================</p> Thu, 02 May 2013 13:21:01 +0000 laze comment 60121 at https://www.ejabberd.im I ran ejabberdctl debug and https://www.ejabberd.im/node/11121#comment-60120 <p>I ran ejabberdctl debug and then etop:start([{output, text}]).</p> <p>I see:<br /> Pid Time Reds Memory MsgQ Current Function<br /> &lt;5591.511.0&gt; ejabberd_mod_pubsub_ '-' 127139******** 62378 dets:req/2</p> <p>We had a bug in our client that caused subscriptions to be sent over and over again for the same items. We are in the process of desubscribing from these which I think explains the the MsgQ size. Question is why is Time set to '-' and why does the CPU seem to get fixed at about 1 CPU?</p> <p>Full output:<br /> ========================================================================================<br /> 'ejabberd@prod-xmpp-barker0.prod.djrd.dowjones.net' 13:14:25<br /> Load: cpu 117 Memory: total 2338890 binary 24916<br /> procs 2155 processes 1822205 code 15571<br /> runq 1 atom 549 ets 441591</p> <p>Pid Name or Initial Func Time Reds Memory MsgQ Current Function<br /> ----------------------------------------------------------------------------------------<br /> &lt;5591.245.0&gt; proc_lib:init_p/5 '-' 1860068 29872 0 dets:open_file_loop2<br /> &lt;5591.501.0&gt; ejabberd_mod_pubsub_ '-' 51033022445928 0 gen_server:loop/6<br /> ***************proc_lib:init_p/5 '-' 219408 460048 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 143353 4119712 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 143053 689576 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 133426 514232 0 prim_inet:recv0/3<br /> ***************proc_lib:init_p/5 '-' 128552 426560 0 prim_inet:recv0/3<br /> &lt;5591.511.0&gt; ejabberd_mod_pubsub_ '-' 127139******** 62378 dets:req/2<br /> ***************proc_lib:init_p/5 '-' 113503 4720688 0 gen:do_call/4<br /> ***************proc_lib:init_p/5 '-' 97313 284704 0 prim_inet:recv0/3<br /> ========================================================================================</p> Thu, 02 May 2013 13:17:24 +0000 laze comment 60120 at https://www.ejabberd.im