Hi,
On 8/19/13 4:05 PM, Alex Balashov wrote:
According the docs, the hash table is restricted to a
maximum size of
2^16 (65536) buckets.
it was restricted to 2^14, I just lifted it to positive
integer range
2^31 because it is easier to get now systems with plenty of memory -- it
will be in next major release.
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.
So, you can put 2m values into the htable. I am not sure that it is
the optimal use of an htable, however.
With the previous upper limit (2^14) you could get a fair distribution
of about 125 items per slot, which is still fine for linear searching,
provided a modern CPU server.
You can simulate some tests and measure the search performances with
benchmark module.
Regards,
Ramona
Ricardo Martinez <rmartinez(a)redvoiss.net> wrote:
Anyone here?
Thanks!
Ricardo.-
*De:*Ricardo Martinez [mailto:rmartinez@redvoiss.net
<mailto:rmartinez@redvoiss.net>]
*Enviado el:* miércoles, 14 de agosto de 2013 18:34
*Para:* sr-users(a)lists.sip-router.org
<mailto:sr-users@lists.sip-router.org>
*Asunto:* Hash Table capacity
Hello list.
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!?
Hope someone can help me.
Thanks,
Ricardo Martinez.-
------------------------------------------------------------------------
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Sent from my mobile, and thus lacking in the refinement one might
expect from a fully fledged keyboard.
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web:
http://www.evaristesys.com/,
http://www.alexbalashov.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users