<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:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Another tip for you… You’ll be tempted to crank up the fetch_rows to try to get it to load faster, but I’ve found that increasing that above 5k-ish doesn’t really seem to speed anything up and sometimes causes it to run a bit slower when
 importing the larger datasets.  Obviously there are a lot of factors that go into that, but with a decently specced DB server and Kam server, once I started getting above 5k it did start slowing down again.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:"Century Gothic",sans-serif;color:black">Brooks Bridges</span></b><span style="font-size:8.0pt;font-family:"Century Gothic",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span 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"><span 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"><b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">Office:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:blue">
</span><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:black">916-235-2097
</span><b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">Main:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:blue">
</span><span 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"><b><span 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 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"><img border="0" width="204" height="61" style="width:2.125in;height:.6354in" id="Picture_x0020_2" src="cid:image001.png@01D84A64.BBF859F0"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>David Villasmil<br>
<b>Sent:</b> Thursday, April 7, 2022 09:34<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>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">Thanks Brooks, that's great news!<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">David Villasmil<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">
david.villasmil.work@gmail.com</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">phone: +34669448337<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Thu, Apr 7, 2022 at 4:20 PM Brooks Bridges <<a href="mailto:bbridges@call48.com">bbridges@call48.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
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></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
 <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<b><span style="font-size:8.0pt;font-family:"Century Gothic",sans-serif;color:black">Brooks Bridges</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#7F7F7F">1200 S. Rogers Circle, Unit 6
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#7F7F7F">Boca Raton, FL 33487</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">Office:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:blue">
</span><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:black">916-235-2097
</span><b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">Main:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:blue">
</span><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:black">888-444-1111</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">email:
<a href="mailto:bbridges@call48.com" target="_blank"><span style="color:#0563C1">bbridges@call48.com</span></a></span></b><span style="font-size:7.0pt;font-family:"Century Gothic",sans-serif;color:#548DD4">  | <b>web:</b>
<a href="http://www.call48.com/" target="_blank">www.call48.com</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<img border="0" width="204" height="61" style="width:2.125in;height:.6354in" id="gmail-m_2378862153167531925Picture_x0020_1" src="cid:image001.png@01D84A64.BBF859F0"><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
 <o:p></o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
<b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">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" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> Re: [SR-Users] Htable reload<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
 <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
Thanks Alex, I'm wondering how this will affect performance if there are many thousands or even millions of records...<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
 <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
David Villasmil<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
phone: +34669448337<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
 <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
 <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
On Thu, Apr 7, 2022 at 4:03 PM Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:1.0in">
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></p>
</blockquote>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in">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></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">__________________________________________________________<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></p>
</blockquote>
</div>
</div>
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.
</body>
</html>