<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello,<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 lang="EN-GB" style="mso-fareast-language:EN-US">just a note: if you use that large dataset, especially if the purpose is for routing decisions/prefix matching, you probably will get a better lookup performance with modules that uses
 another data structure more optimized for this case. Two examples for these modules are mtree and carrierroute. A hash table can degenerate into linear list(s), if the data is formed in a specific way.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Brooks Bridges<br>
<b>Sent:</b> Thursday, April 7, 2022 5:17 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> Re: [SR-Users] Htable reload<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">I have several htables with various amounts of data in them ranging from a couple hundred entries to a couple million entries and while the reload itself does take a bit, the vast majority of
 the delay is the database -> Kamailio loading time.  Once the data is in there, the pointer updates haven’t been anything I’ve noticed.  I’m sure it takes some measurable amount of time, but in my case it’s so imperceptible that it’s irrelevant.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b><span lang="EN-US" style="font-size:8.0pt;font-family:"Century Gothic",sans-serif;color:black">Brooks Bridges</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:"Century Gothic",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#7F7F7F">1200 S. Rogers Circle, Unit 6
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#7F7F7F">Boca Raton, FL 33487<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">Office:</span></b><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:blue">
</span><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:black">916-235-2097
</span><b><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">Main:</span></b><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:blue">
</span><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:black">888-444-1111<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">email:
<a href="mailto:bbridges@call48.com"><span style="color:#0563C1">bbridges@call48.com</span></a></span></b><span lang="EN-US" style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">  | <b>web:</b>
<a href="http://www.call48.com/">www.call48.com</a><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><img border="0" width="204" height="61" style="width:2.125in;height:.6354in" id="Picture_x0020_1" src="cid:image001.png@01D84ABD.7836EED0"></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:71.4pt"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>David Villasmil<br>
<b>Sent:</b> Thursday, April 7, 2022 08:09<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> Re: [SR-Users] Htable reload<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">Thanks Alex, I'm wondering how this will affect performance if there are many thousands or even millions of records...<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US"><br clear="all">
<o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">Regards,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">David Villasmil<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">
david.villasmil.work@gmail.com</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">phone: +34669448337<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">On Thu, Apr 7, 2022 at 4:03 PM Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>> wrote:<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:71.4pt"><span lang="EN-US">No, the reload actually creates a temporary new hash table (in heap), loads the entries from the DB into it, then iterates through the buckets of that temporary table and replaces the entries
 (pointers) in the existing table with the entries from the temporary table, then frees the buckets in the temporary table.<br>
<br>
> On Apr 7, 2022, at 4:43 AM, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br>
> <br>
> Hello all,<br>
> <br>
> I’ve been trying to figure out how htable reloads happen. Does it replaces the existing one or creates a new one, populates it from the db and then renames it? The latter would be (I think) ideal, even if it uses more resources.<br>
> <br>
> Thanks!<br>
> <br>
> David<br>
> -- <br>
> Regards,<br>
> <br>
> David Villasmil<br>
> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
> phone: +34669448337<br>
> __________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial Discussions<br>
>  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
> Edit mailing list options or unsubscribe:<br>
>  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>,
<a href="http://www.csrpswitch.com/" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail.
 If the reader of this e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error,
 please immediately return it to the sender and delete it from your system. <o:p>
</o:p></span></p>
</div>
</body>
</html>