<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>the workload is split between the processes created due to param
timer_procs>1. If timer_procs=0, is the primary timer that
takes care of checking for and cleaning expired records.</p>
<p>If timer_procs=1, then a dedicated timer process is created by
usrloc and this timer process is doing the cleanup job for all
location records. If timer_procs>1, then the workload is split
among those processes, each process gets assigned a list of slots
from the internal hash table storing the location records and they
do cleanup on those slots.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 20.02.20 08:50, Alex Balashov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:A1C2B868-9FBA-4FD1-90C4-363A2D47CF91@evaristesys.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Thanks, Henning.
<div><br>
</div>
<div>But I thought Joel’s question about multiple processes was
interesting. Is the workload somehow split up among them? If
not, why have multiple ones?<br>
<br>
<div dir="ltr">—
<div>Sent from my iPad</div>
</div>
<div dir="ltr"><br>
<blockquote type="cite">On Feb 20, 2020, at 2:00 AM, Henning
Westerholt <a class="moz-txt-link-rfc2396E" href="mailto:hw@skalatan.de"><hw@skalatan.de></a> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US">Hi Joel,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">$
root@proxy-1:~# kamcmd ps |grep second<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US">31314 secondary
timer<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Basically
it makes sense to use a dedicated timer if you have a
large DB and/or a DB which is not particularly fast
for the expiration, to not block the core timer to
long.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Henning
Westerholt –
</span><span style="mso-fareast-language:EN-US"><a
href="https://skalatan.de/blog/"
moz-do-not-send="true"><span style="color:#0563C1"
lang="EN-GB">https://skalatan.de/blog/</span></a></span><span
style="mso-fareast-language:EN-US" lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB">Kamailio
services –
</span><span style="mso-fareast-language:EN-US"><a
href="https://gilawa.com/" moz-do-not-send="true"><span
style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a></span><span
style="mso-fareast-language:EN-US">
<span lang="EN-GB"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US" lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b>
sr-users <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a>
<b>On Behalf Of </b>Joel Serrano<br>
<b>Sent:</b> Thursday, February 20, 2020 1:12 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> [SR-Users] Understanding some usrloc
modparams<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I have
an installation using usrloc + db_mode=1.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">If I
want on db_mode=1 or db_mode=2 the expired contacts
to be cleaned up I have to enable the modparam
db_timer_clean:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><a
href="https://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.db_timer_clean"
moz-do-not-send="true">https://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.db_timer_clean</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">The
docs say:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">"<i>Enable
(1) or disable (0) cleaning of expired db records
on timer basis for db_mode WRITE-BACK and
WRITE-THROUGH. It uses the secondary timer
process.</i>"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I have
the following doubts:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">1-
What does the reference "it uses
<b><i>the</i></b> secondary timer process" mean? Is
there a specific secondary timer just for this
purpose?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">2- Is
#1 related to the modparam timer_procs? (so it uses
one of those when enabled?)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">3-
Why/When would you need a timer_proces modparam with
a value higher than "1"? <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Thanks, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Joel.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>
</div>
<span>_______________________________________________</span><br>
<span>Kamailio (SER) - Users Mailing List</span><br>
<span><a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></span><br>
<span><a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 9-11, 2020, Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - April 27-29, 2020, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>