[SR-Users] Dialog Module Hash Size vs Number of Dialogs

Daniel-Constantin Mierla miconda at gmail.com
Sat Dec 2 08:50:49 CET 2017


Hello,

hash size does not set any limitation to the number of dialogs (active
calls), it has impact on searching the dialogs, so if you have a lot of
active calls, increasing the hash size might improve performances.
Effectively the hash size is used to compute the number of slots (aka
buckets) the hash table is going to have, see more technical details
about hash tables at:

  - https://en.wikipedia.org/wiki/Hash_table

Can you elaborate on your statement:

> but even setting the hash size to a very tiny number does stop me from
creating hundreds of dialogs

Do you mean you are not able to create as many dialogs as you want?

Cheers,
Daniel


On 01.12.17 19:54, Mark Blackford wrote:
> Hello,
>
> I am trying to properly size the use of the Dialog Module hash for our
> implementation using:
>
> modparam("dialog", "hash_size", <number that is power of two>)
>
> However, in my testing, I have been unable to figure out the
> relationship between the hash size and a number of dialogs I need to
> support.  I think the hash size is specifying a memory block in kB,
> but even setting the hash size to a very tiny number does stop me from
> creating hundreds of dialogs.
>
> Is there a way to determine a relationship between the hash size and a
> rough number of dialogs that would be expected?
>
> An example of a a dialog looks like this from kamctl:
>
> [root at kamailio01 ~]# kamctl dialog show
> dialog memory records
> dialog::  hash=22:70
> state:: 4
> ref_count:: 2
> timestart:: 1512151205
> timeout:: 36083666
> callid::
> 0gQAAC8WAAACBAAALxYAAClws2wyL8GE+CSgRY7HIhmg9ZUIISZad46ntOPng3iPIcLaxzLFaytRTI7M0Bzz0g-- at 10.155.8.40
> <mailto:0gQAAC8WAAACBAAALxYAAClws2wyL8GE%2BCSgRY7HIhmg9ZUIISZad46ntOPng3iPIcLaxzLFaytRTI7M0Bzz0g-- at 10.155.8.40>
> from_uri:: sip:b53667d44239457fbc94fc2f4c4e25a6 at sip.dcs-staging.net
> <mailto:sip%3Ab53667d44239457fbc94fc2f4c4e25a6 at sip.dcs-staging.net>
> from_tag:: 10.155.8.40+1+689d7e5e+8fcf481a
> caller_contact::
> sip:43f0ae1480846185e8803f21e9f2b721 at 10.155.8.40:5060;transport=udp
> caller_cseq:: 24115
> caller_route_set:: 
> caller_bind_addr:: udp:10.155.8.11:5060 <http://10.155.8.11:5060>
> callee_bind_addr:: udp:10.155.8.11:5060 <http://10.155.8.11:5060>
> to_uri:: sip:2052773090 at sip.dcs-staging.net
> <mailto:sip%3A2052773090 at sip.dcs-staging.net>
> to_tag:: sip+1+bdcd0004+2038f37c
> callee_contact::
> sip:ca2013e84f10348a1cc825c12562bde7 at 10.155.8.40:5060;transport=udp
> callee_cseq:: 0
> callee_route_set:: 
>
>  
>
> Thanks!
> -- 
> Mark Blackford
> Digium Cloud Services
> 678.230.8769
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171202/1774da16/attachment.html>


More information about the sr-users mailing list