<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi Ravi,</tt></p>
<p><tt>The TCP/TLS code is not optimized to dispatch/parallelize the
SIP messages read by a single worker on a heavily reused TCP
connection. They will be processed serially, one at a time
(possibly not by the same TCP worker, but that's irrelevant).
However, SIP message processing in OpenSIPS is super fast and your
TCP read buffers should never get filled up, unless maybe your
kernel buffer sizes are too low. See this tutorial [1] for some
tuning tips.<br>
</tt></p>
<p><tt>On a different note, the more blocking ops you do in your
script, the more chances for your box to start advertising TCP
zero window to the app server. If that's your case, then your
best bet is to move to a 2.2+ OpenSIPS, and make those
statements asynchronous. </tt></p>
<p><tt>[1]: <a class="moz-txt-link-freetext" href="https://www.cyberciti.biz/faq/linux-tcp-tuning/">https://www.cyberciti.biz/faq/linux-tcp-tuning/</a><br>
</tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 09.06.2017 07:00, Ravitez Ravi
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANs_LF_0iCc=tLT0fRAPg-ds_UWGf9Jx9zBDRZGEMSG2f7h0pA@mail.gmail.com">
<div dir="ltr">
<p class="MsoNormal">Hi All,<span></span></p>
<p class="MsoNormal"> Good
Day,<span></span></p>
<p class="MsoNormal"> I’m using
opensips V1.11.5-TLS and facing a problem with Zero Window.<span></span></p>
<p class="MsoNormal"> Here’s
the scenario :<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">
200
OK<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips
<span style="font-family:Wingdings">ß</span>----------------------------
App Server<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span> </span></p>
<p class="MsoNormal" style="text-indent:0.5in">Now lets assume
this<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal">
NOTIFY<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips client
---------------------------<span style="font-family:Wingdings">à</span>
App server<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">
200
OK|200 ok | 200 ok | 200 ok<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">Opensips
<span style="font-family:Wingdings">ß</span>----------------------------
App Server<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span> </span></p>
<p class="MsoNormal" style="text-indent:0.5in">Assuming the size
of response if
5000 bytes.<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">tcp_main detects
data in the buffer
and passes on to the child process to read the data from the
buffer,<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">child(buffer size
65535 ) now reads
the data from the socket<span></span></p>
<p class="MsoNormal" style="text-indent:0.5in">tcp_read_req()<span></span></p>
<p class="gmail-MsoListParagraph" style="margin-left:1.25in">-<span
style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times
New Roman"">
</span><span style="color:black">tcp_read_headers()</span><span></span></p>
<p class="gmail-MsoListParagraph" style="margin-left:1.25in">-<span
style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times
New Roman"">
</span><span style="color:black">Loops until all the
sip messages are extracted and forwarded/processed</span><span></span></p>
<p class="gmail-MsoListParagraph" style="margin-left:1.25in">-<span
style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"Times
New Roman"">
</span><span style="color:black">Releases the
connection to tcp_main</span><span></span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal" style="margin-left:0.5in">Tcp_main attaches
to IO<span></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span> </span></p>
<p class="MsoNormal" style="margin-left:0.5in">During the timer
interval where system reads the data from the socket and
process the data there would be new data
pipelined in the socket, this gradually results in Zero
window <span style="font-family:Wingdings">L</span> <span></span></p>
<p class="MsoNormal" style="margin-left:0.5in">Would like to
know if there’s a way
to process the next available data on the socket once its been
read.Thank you
for your time <span style="font-family:Wingdings">J</span></p>
<p class="MsoNormal" style="margin-left:0.5in"><br>
</p>
<p class="MsoNormal" style="margin-left:0.5in"><br>
</p>
<p class="MsoNormal" style="margin-left:0.5in">Regards,</p>
<p class="MsoNormal" style="margin-left:0.5in">Ravitez.D</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>