ejabberd - Comments for "4 times slower performance when sending receipt for close in IBB" https://www.ejabberd.im/node/5042 en No one? I'm stucked with this https://www.ejabberd.im/node/5042#comment-58045 <p>No one? I'm stucked with this one.</p> Thu, 17 Nov 2011 11:18:32 +0000 Tomcat comment 58045 at https://www.ejabberd.im I did some research with https://www.ejabberd.im/node/5042#comment-58003 <p>I did some research with tcpdump on the server where ejabberd is running. The problem has something to do with an ACK that is send with delay.</p> <p>Here is the dump corresponding to the sequence above (I can reproduce this any time):</p> <p>The messages were send from the ejabberd to the client1 and then the &lt;close&gt; is delivered:</p> <div class="codeblock"><code>09:28:45.387026 IP 192.168.50.51.xmpp-client &gt; 192.168.2.54.26390: Flags [P.], seq 97096:97255, ack 2378, win 262, length 159<br />E.....@.@.i...23...6.fg....;....P....s..&lt;iq from=&#039;test@localhost/GU-PC&#039; to=&#039;jadmin@localhost/PROTEL-JANTH&#039; type=&#039;set&#039; id=&#039;527d7c07&#039;&gt;&lt;close xmlns=&#039;http://jabber.org/protocol/ibb&#039; sid=&#039;7ac8897f&#039;/&gt;&lt;/iq&gt;</code></div> <p>Then the ACKs for the messages from client1 comes in:</p> <div class="codeblock"><code>09:28:45.387110 IP 192.168.2.54.26390 &gt; 192.168.50.51.xmpp-client: Flags [.], ack 92338, win 16425, length 0<br />E..(..@...8q...6..23g..f........P.@).4........<br />09:28:45.387267 IP 192.168.2.54.26390 &gt; 192.168.50.51.xmpp-client: Flags [.], ack 95131, win 16425, length 0<br />E..(..@...8p...6..23g..f........P.@).K........<br />09:28:45.387678 IP 192.168.2.54.26390 &gt; 192.168.50.51.xmpp-client: Flags [.], ack 97096, win 16425, length 0<br />E..(..@...8o...6..23g..f.......;P.@)..........</code></div> <p>Now the receipt on the &lt;close&gt; is send from the client1 to the ejabberd combined with the ACK for the &lt;close&gt;</p> <div class="codeblock"><code>09:28:45.391483 IP 192.168.2.54.26390 &gt; 192.168.50.51.xmpp-client: Flags [P.], seq 2378:2484, ack 97255, win 16385, length 106<br />E.....@...7....6..23g..f........P.@..}..&lt;iq type=&quot;result&quot; id=&quot;527d7c07&quot; to=&quot;test@localhost/GU-PC&quot; from=&quot;jadmin@localhost/PROTEL-JANTH&quot; xmlns=&quot;&quot; /&gt;</code></div> <p>The ejabberd sends the receipt to the client2. Everything fine, but ...</p> <div class="codeblock"><code>09:28:45.391820 IP 192.168.50.51.xmpp-client &gt; 192.168.0.125.48403: Flags [P.], seq 2541:2637, ack 96625, win 1678, length 96<br />E...rc@.@.....23...}.f...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....G.P....{..&lt;iq from=&#039;jadmin@localhost/PROTEL-JANTH&#039; to=&#039;test@localhost/GU-PC&#039; type=&#039;result&#039; id=&#039;527d7c07&#039;/&gt;</code></div> <p>.. the ACK for the receipt is send with delay to the client1. </p> <div class="codeblock"><code>09:28:45.424646 IP 192.168.50.51.xmpp-client &gt; 192.168.2.54.26390: Flags [.], ack 2484, win 262, length 0<br />E..(..@.@.j...23...6.fg.........P.......</code></div> <p>Any idea what happens this 32 MilliSeconds? If you need anything more to help me with this, please let me know.</p> <p>I suspected the shaper to be the reason, but the problem still exists after disabling the shapers completly.</p> <p>Kind regards</p> <p>PS: Here is the ejabberd-log from this message. I can't see anything suspicous here. I think the next message from client1 is send with delay because of the delayed ACK.</p> <div class="codeblock"><code>=INFO REPORT==== 2011-11-07 09:28:45.412 ===<br />D(&lt;0.387.0&gt;:ejabberd_receiver:320) : Received XML on stream = &quot;&lt;iq type=\&quot;result\&quot; id=\&quot;527d7c07\&quot; to=\&quot;test@localhost/GU-PC\&quot; from=\&quot;jadmin@localhost/PROTEL-JANTH\&quot; xmlns=\&quot;\&quot; /&gt;&quot; <p>=INFO REPORT==== 2011-11-07 09:28:45.412 ===<br />D(&lt;0.388.0&gt;:ejabberd_router:313) : route<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from {jid,&quot;jadmin&quot;,&quot;localhost&quot;,&quot;PROTEL-JANTH&quot;,&quot;jadmin&quot;,&quot;localhost&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;PROTEL-JANTH&quot;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to {jid,&quot;test&quot;,&quot;localhost&quot;,&quot;GU-PC&quot;,&quot;test&quot;,&quot;localhost&quot;,&quot;GU-PC&quot;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet {xmlelement,&quot;iq&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{&quot;type&quot;,&quot;result&quot;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&quot;id&quot;,&quot;527d7c07&quot;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&quot;to&quot;,&quot;test@localhost/GU-PC&quot;},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&quot;from&quot;,&quot;jadmin@localhost/PROTEL-JANTH&quot;}],<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []}</p> <p>=INFO REPORT==== 2011-11-07 09:28:45.413 ===<br />D(&lt;0.388.0&gt;:ejabberd_local:300) : local route<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from {jid,&quot;jadmin&quot;,&quot;localhost&quot;,&quot;PROTEL-JANTH&quot;,&quot;jadmin&quot;,&quot;localhost&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;PROTEL-JANTH&quot;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to {jid,&quot;test&quot;,&quot;localhost&quot;,&quot;GU-PC&quot;,&quot;test&quot;,&quot;localhost&quot;,&quot;GU-PC&quot;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet {xmlelement,&quot;iq&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{&quot;type&quot;,&quot;result&quot;},{&quot;id&quot;,[...]},{[...],...},{...}],<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []}</p> <p>=INFO REPORT==== 2011-11-07 09:28:45.413 ===<br />D(&lt;0.388.0&gt;:ejabberd_sm:411) : session manager<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from {jid,&quot;jadmin&quot;,&quot;localhost&quot;,&quot;PROTEL-JANTH&quot;,&quot;jadmin&quot;,&quot;localhost&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;PROTEL-JANTH&quot;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to {jid,&quot;test&quot;,&quot;localhost&quot;,&quot;GU-PC&quot;,&quot;test&quot;,&quot;localhost&quot;,&quot;GU-PC&quot;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; packet {xmlelement,&quot;iq&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{&quot;type&quot;,&quot;result&quot;},{&quot;id&quot;,[...]},{[...],...},{...}],<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []}</p> <p>=INFO REPORT==== 2011-11-07 09:28:45.414 ===<br />D(&lt;0.388.0&gt;:ejabberd_sm:510) : sending to process &lt;0.391.0&gt;</p> <p>=INFO REPORT==== 2011-11-07 09:28:45.414 ===<br />D(&lt;0.391.0&gt;:ejabberd_c2s:1558) : Send XML on stream = &lt;&lt;&quot;&lt;iq from=&#039;jadmin@localhost/PROTEL-JANTH&#039; to=&#039;test@localhost/GU-PC&#039; type=&#039;result&#039; id=&#039;527d7c07&#039;/&gt;&quot;&gt;&gt;</p> <p>=INFO REPORT==== 2011-11-07 09:28:45.425 ===<br />D(&lt;0.387.0&gt;:ejabberd_receiver:320) : Received XML on stream = &quot;&lt;message to=\&quot;test@localhost\&quot; id=\&quot;9\&quot;&gt;&lt;body&gt;10000&lt;/body&gt;&lt;/message&gt;&quot;</p></code></div> Mon, 07 Nov 2011 10:32:55 +0000 Tomcat comment 58003 at https://www.ejabberd.im