<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>The versions before 2.1 had a completely different approach on hoe
the timer jobs were handled - different code, so no such warnings.
The 2.1 introduces the a more flexible and scalable processing for
the timer jobs. <br>
<br>
Could you confirm that removing the DB op from the startup route
eliminates the warnings ?<br>
<br>
Thanks,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and 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 01/24/2017 03:49 PM, Ahmed Munir
wrote:<br>
</div>
<blockquote
cite="mid:CAGMN=JdEHWXCdKp+pWXujNtypmiCjDHZujCy5S=LjXt9x7vMCg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Yes, using startup route in my routing script and running
DB query. This kind of warning I didn't face using 1.6 and 1.8
opensips versions but 2.2.2.<br>
<br>
</div>
Will you recommend async statement for my current routing (see
below) for the startup?<br>
<br>
startup_route<br>
{<br>
$var(res) = 1;<br>
$avp(tmp) = "1";<br>
# $var(x) = 0;<br>
while($var(res) > 0)<br>
{<br>
$var(res) = avp_db_query("SELECT Distinct One800, dnis
FROM DNIS_Mapping where One800 > $avp(tmp) order by One800;",
"$avp(One800), $avp(dnis)");<br>
if($var(res) >= 0)<br>
{<br>
$var(i) = 0;<br>
while($(avp(One800)[$var(i)]) != "NULL")<br>
{<br>
cache_store("local",
"DNIS_$(avp(dnis)[$var(i)])", "$(avp(One800)[$var(i)])");<br>
$avp(tmp) = $(avp(One800)[$var(i)]);<br>
# $var(x) = $var(x) + 1;<br>
$(avp(One800)[$var(i)]) = "NULL";<br>
$var(i) = $var(i) + 1;<br>
# xlog("$var(x) :
$(avp(s:dnis)[$var(i)])");<br>
}<br>
}<br>
}<br>
}<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 24, 2017 at 6:38 AM,
Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi Ahmed,<br>
<br>
So, the warnings pop up ONLY during startup sequence. Do
you use startup route or any module performing mem caching
of some DB table (drouting, permission, etc) ? Usually,
the first UDP child is doing some heavy lifting during
startup.<span class=""><br>
<br>
Regards,<br>
<pre class="m_-6569476229966256159moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="m_-6569476229966256159moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a></pre>
</span><div><div class="h5"><div class="m_-6569476229966256159moz-cite-prefix">On 01/19/2017 06:01 PM, Ahmed Munir
wrote:
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi Razvan,
</div>
During starting up the opensips service, I see the first
opensips child process (pid"11172) consumes CPU process to
70-80% and later drop downs to 0.3 - 0.0 % CPU per core. See
below;
[root@qorblpsisprxyd1 ~]# top -c -u opensips
top - 10:49:54 up 76 days, 23:31, 5 users, load average: 0.00,
0.00, 0.00
Tasks: 229 total, 1 running, 228 sleeping, 0 stopped, 0
zombie
Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.9%id, 0.0%wa, 0.0%hi,
0.0%si, 0.0%st
Mem: 65964364k total, 2568124k used, 63396240k free, 180220k
buffers
Swap: 1023996k total, 0k used, 1023996k free, 1226104k
cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
11177 opensips 20 0 165m 5696 4528 S 0.3 0.0 0:00.23
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11187 opensips 20 0 165m 5628 4460 S 0.3 0.0 0:00.41
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11166 opensips 20 0 165m 6892 5752 S 0.0 0.0 0:00.23
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11168 opensips 20 0 165m 1980 840 S 0.0 0.0 0:00.00
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11169 opensips 20 0 165m 1464 328 S 0.0 0.0 0:00.53
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11171 opensips 20 0 165m 1640 504 S 0.0 0.0 0:00.15
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11172 opensips 20 0 166m 40m 38m S 0.0 0.1 0:02.61
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11174 opensips 20 0 165m 6304 5136 S 0.0 0.0 0:00.24
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11175 opensips 20 0 165m 5884 4716 S 0.0 0.0 0:00.22
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11179 opensips 20 0 165m 7660 6492 S 0.0 0.0 0:00.27
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11181 opensips 20 0 165m 7756 6588 S 0.0 0.0 0:00.33
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11183 opensips 20 0 165m 5520 4352 S 0.0 0.0 0:00.34
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11185 opensips 20 0 165m 7336 6168 S 0.0 0.0 0:00.36
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11189 opensips 20 0 165m 7320 6152 S 0.0 0.0 0:00.36
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
11190 opensips 20 0 165m 4688 3528 S 0.0 0.0 0:00.30
/usr/sbin/opensips -P /var/run/opensips.pid -m 64 -u opensips -g
opensips
<div>
<div>
<div class="gmail_extra">[root@qorblpsisprxyd1 ~]#
opensipsctl fifo ps
Process:: ID=0 PID=11166 Type=attendant
Process:: ID=1 PID=11168 Type=MI FIFO
Process:: ID=2 PID=11169 Type=time_keeper
Process:: ID=3 PID=11171 Type=timer
Process:: ID=4 PID=11172 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=5 PID=11174 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=6 PID=11175 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=7 PID=11177 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=8 PID=11179 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=9 PID=11181 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=10 PID=11183 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=11 PID=11185 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=12 PID=11187 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=13 PID=11189 Type=SIP receiver udp:<a moz-do-not-send="true" href="http://10.3.120.94:5060" target="_blank">10.3.120.94:5060</a>
Process:: ID=14 PID=11190 Type=Timer handler
OpenSIPs used by each CPU processor;
[root@qorblpsisprxyd1 ~]# ps -o pid,psr,comm -C opensips
PID PSR COMMAND
11166 0 opensips
11168 2 opensips
11169 6 opensips
11171 5 opensips
11172 5 opensips
11174 5 opensips
11175 5 opensips
11177 5 opensips
11179 7 opensips
11181 1 opensips
11183 0 opensips
11185 2 opensips
11187 5 opensips
11189 5 opensips
11190 4 opensips
</div>
</div>
</div>
</div>
</blockquote>
</div></div></div>
</blockquote></div>
--
<div class="gmail_signature" data-smartmail="gmail_signature">Regards,
Ahmed Munir Chohan
</div>
</div>
</blockquote>
</body></html>