<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><meta name="Generator" content="Microsoft Word 14 (filtered medium)" /><style><!--
/* Font Definitions */
@font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin:0cm;
 margin-bottom:.0001pt;
 font-size:11.0pt;
 font-family:"Calibri","sans-serif";
 mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
 {mso-style-priority:99;
 color:blue;
 text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
 {mso-style-priority:99;
 color:purple;
 text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
 {mso-style-priority:99;
 mso-style-link:"Texto de globo Car";
 margin:0cm;
 margin-bottom:.0001pt;
 font-size:8.0pt;
 font-family:"Tahoma","sans-serif";
 mso-fareast-language:EN-US;}
span.TextodegloboCar
 {mso-style-name:"Texto de globo Car";
 mso-style-priority:99;
 mso-style-link:"Texto de globo";
 font-family:"Tahoma","sans-serif";}
span.EstiloCorreo19
 {mso-style-type:personal;
 font-family:"Calibri","sans-serif";
 color:windowtext;}
span.EstiloCorreo20
 {mso-style-type:personal-reply;
 font-family:"Calibri","sans-serif";
 color:#1F497D;}
.MsoChpDefault
 {mso-style-type:export-only;
 font-size:10.0pt;}
@page WordSection1
 {size:612.0pt 792.0pt;
 margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
 {page:WordSection1;}
--></style></head><body lang="ES-CL" link="blue" vlink="purple">According the docs, the hash table is restricted to a maximum size of 2^16 (65536) buckets. <br>
<br>
This doesn't mean that the htable can only hold 65k entries, just that it's the maximum number of unique buckets. Assuming a theoretically ideal distribution where every value has a unique bucket, after 65k values, you will get collisions. Collision chains attached to buckets are linear lists. After collision chains get deep, performance becomes more and more linear. <br>
<br>
So, you can put 2m values into the htable. I am not sure that it is the optimal use of an htable, however. <br>
<br><br><div class="gmail_quote">Ricardo Martinez <rmartinez@redvoiss.net> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="WordSection1"><p class="MsoNormal"><span style="color:#1f497d">Anyone here?</span></p><p class="MsoNormal"><span style="color:#1f497d">Thanks!</span></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span></p><p class="MsoNormal"><span style="color:#1f497d">Ricardo.-</span></p><p class="MsoNormal"><span style="color:#1f497d"> </span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="ES" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De:</span></b><span lang="ES" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Ricardo Martinez [mailto:<a href="mailto:rmartinez@redvoiss.net">rmartinez@redvoiss.net</a>] <br />
<b>Enviado el:</b> miércoles, 14 de agosto de 2013 18:34<br /><b>Para:</b> <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br /><b>Asunto:</b> Hash Table capacity</span></p></div></div><p class="MsoNormal">
 </p><p class="MsoNormal"><span lang="EN-US" style="style">Hello list.</span></p><p class="MsoNormal"><span lang="EN-US" style="style">I have a question about the HTABLE module.  Suppose that I have a mysql database with 2 million of records.  Is possible to load this table as a hash table compatible with Kamailio!?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="style"> </span></p><p class="MsoNormal"><span lang="EN-US" style="style">Hope someone can help me.</span></p><p class="MsoNormal"><span lang="EN-US" style="style"> </span></p><p class="MsoNormal"><span lang="EN-US" style="style">Thanks,<br />
Ricardo Martinez.-</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br />sr-users@lists.sip-router.org<br /><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br /></pre></blockquote></div><br>
--<br>
Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard. <br>
<br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
United States<br>
Tel: +1-678-954-0670<br>
Web: <a href="http://www.evaristesys.com">http://www.evaristesys.com</a>/, <a href="http://www.alexbalashov.com">http://www.alexbalashov.com</a></body></html>