<div dir="ltr">did you see<div><br></div><div><div class="gmail-titlepage" style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:15px"><div><div><h3 class="gmail-title" style="margin:1em 0px 0.75em;padding:0px 0px 5px 5px;color:rgb(107,83,68);font-family:Scada,Helvetica,sans-serif;font-size:20px;line-height:28px;font-style:italic">3.10. <code class="gmail-varname">fetch_rows</code> (integer)</h3></div></div></div><p style="font-family:Helvetica,Arial,sans-serif;text-align:justify;color:rgb(0,0,0);font-size:15px">The number of the rows to be fetched at once from database when loading the routing data. This value can be used to tune the load time at startup. For 1MB of private memory (default) it should be below 3750. The database driver must support the fetch_result() capability. This parameter is tunable via the ser cfg framework.</p><p style="font-family:Helvetica,Arial,sans-serif;text-align:justify;color:rgb(0,0,0);font-size:15px"><span class="emphasis"><em>Default value is <span class="gmail-quote">“<span class="gmail-quote">2000</span>”</span>.</em></span></p><div class="example" style="border:thin dotted rgb(112,170,229);padding-left:10px;padding-right:10px;color:rgb(0,0,0);background-color:rgb(239,248,248);overflow:auto;border-radius:2.5px;font-family:Helvetica,Arial,sans-serif;font-size:15px"><a id="gmail-idm158" style="color:rgb(4,31,197)"></a><p class="gmail-title" style="text-align:justify"><strong>Example 1.10. Set <code class="gmail-varname">fetch_rows</code> parameter</strong></p><div class="example-contents"><pre class="gmail-programlisting" style="background-color:rgb(252,255,252);border:1px solid rgb(153,204,204);padding-left:15pt;overflow:auto;border-radius:2.5px">...
modparam("carrierroute", "fetch_rows", 3000)
...</pre></div></div><br class="gmail-Apple-interchange-newline"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div> ?</div><div><br></div><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 28, 2021 at 3:37 PM kristina258 <<a href="mailto:notifications@github.com">notifications@github.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p></p>
<h3>Description</h3>
<p>Hi,</p>
<p>I am migrating from Kamailio 4.4.7 (debian 8.1) to 5.4.3 (debian 10.7).<br>
I changed the neccessary changes in configuration (replaced MI with RPC) and I tried to start the kamailio. The issue is that it takes about 3minutes to start. On the older version 4.4.7 it started aproximetly in 20s.</p>
<p>The modules I am using are:</p>
<pre><code>"cfgutils.so","db_mysql.so","kex.so","tm.so","tmx.so","sl.so","rr.so","pv.so","maxfwd.so","textops.so","siputils.so","xlog.so","sanity.so","ctl.so","jsonrpcs.so","exec.so","carrierroute.so","avpops.so","sqlops.so","dmq.so","htable.so","dialog.so","acc.so","acc_radius.so","dispatcher.so","dialplan.so","textopsx.so","statsd.so","app_perl.so","http_async_client.so".
</code></pre>
<p>I assume the issue is caused by carrierroute module. It takes also about 3 minutes to reload routes (when the kamailio service is running) using rpc command cr.reload_routes.<br>
I did not change anything in configuration related to carrierroute module.</p>
<pre><code>modparam("carrierroute", "config_source", "db")
modparam("carrierroute", "db_url", DBURL)
modparam("carrierroute", "match_mode", 128)
modparam("carrierroute", "avoid_failed_destinations", 0)
modparam("carrierroute", "carrierroute_table", "carrierroute_view")
</code></pre>
<p>Carrierroute module loading on version 4.4.7 needed:</p>
<ul>
<li>INFO: carrierroute [cr_db.c:317]: load_route_data_db(): <strong>took 1s</strong></li>
<li>INFO: carrierroute [cr_carrier.c:100]: add_domain_data(): and INFO: carrierroute [cr_data.c:414]: get_domain_data_or_add(): <strong>took 8s</strong></li>
<li>INFO: carrierroute [cr_data.c:655]: rule_fixup(): <strong>took 3s</strong></li>
</ul>
<p>Carrierroute module loading on version 5.4.3 needed:</p>
<ul>
<li>INFO: carrierroute [cr_db.c:317]: load_route_data_db(): <strong>took 1s</strong></li>
<li>INFO: carrierroute [cr_carrier.c:100]: add_domain_data(): and INFO: carrierroute [cr_data.c:414]: get_domain_data_or_add(): <strong>took 2min 23s</strong></li>
<li>INFO: carrierroute [cr_data.c:655]: rule_fixup(): <strong>took 17s</strong></li>
</ul>
<p>I have also compiled kamailio version 5.0 on both (debian 8.1 and debian 10.7), but it also took so long to start on both machines.</p>
<h3>Additional Information</h3>
<pre><code>version: kamailio 5.4.3 (x86_64/linux) 06bd17
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 06bd17
compiled on 16:10:30 Jan 25 2021 with gcc 8.3.0
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>Linux 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
Debian 10.7
</code></pre>
<p>Thank you for your help.</p>
<p style="font-size:small;color:rgb(102,102,102)">—<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2613" target="_blank">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPZOQGBIOJNDSJGVDTS4GAARANCNFSM4WXIMFYQ" target="_blank">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMIT3EA6UO6XW6QLETS4GAARA5CNFSM4WXIMFY2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4L3TYF5Q.gif" height="1" width="1" alt=""></p>
_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>