<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>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:</p>
    <p>  - <a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/Hash_table">https://en.wikipedia.org/wiki/Hash_table</a><br>
    </p>
    <p>Can you elaborate on your statement:</p>
    <p>> but even setting the hash size to a very tiny number does
      stop me from creating hundreds of dialogs</p>
    <p>Do you mean you are not able to create as many dialogs as you
      want?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 01.12.17 19:54, Mark Blackford
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAPB2wFtAcjbVmwAcd6XNA=ePMkvB8NiYJwKRHCqboMJ_7OXWQ@mail.gmail.com">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I am trying to properly size the use of the Dialog Module
          hash for our implementation using:</div>
        <div><br>
        </div>
        <div>modparam("dialog", "hash_size", <number that is power of
          two>)</div>
        <div><br>
        </div>
        <div>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.</div>
        <div><br>
        </div>
        <div>Is there a way to determine a relationship between the hash
          size and a rough number of dialogs that would be expected?</div>
        <div><br>
        </div>
        <div>An example of a a dialog looks like this from kamctl:</div>
        <div><br>
        </div>
        <div>
          <div>[root@kamailio01 ~]# kamctl dialog show</div>
          <div>dialog memory records</div>
          <div>dialog::  hash=22:70</div>
          <div><span style="white-space:pre">     </span>state:: 4</div>
          <div><span style="white-space:pre">     </span>ref_count:: 2</div>
          <div><span style="white-space:pre">     </span>timestart::
            1512151205</div>
          <div><span style="white-space:pre">     </span>timeout:: 36083666</div>
          <div><span style="white-space:pre">     </span>callid:: <a
href="mailto:0gQAAC8WAAACBAAALxYAAClws2wyL8GE%2BCSgRY7HIhmg9ZUIISZad46ntOPng3iPIcLaxzLFaytRTI7M0Bzz0g--@10.155.8.40"
              moz-do-not-send="true">0gQAAC8WAAACBAAALxYAAClws2wyL8GE+CSgRY7HIhmg9ZUIISZad46ntOPng3iPIcLaxzLFaytRTI7M0Bzz0g--@10.155.8.40</a></div>
          <div><span style="white-space:pre">     </span>from_uri:: <a
              href="mailto:sip%3Ab53667d44239457fbc94fc2f4c4e25a6@sip.dcs-staging.net"
              moz-do-not-send="true">sip:b53667d44239457fbc94fc2f4c4e25a6@sip.dcs-staging.net</a></div>
          <div><span style="white-space:pre">     </span>from_tag::
            10.155.8.40+1+689d7e5e+8fcf481a</div>
          <div><span style="white-space:pre">     </span>caller_contact::
            <a class="moz-txt-link-freetext" href="sip:43f0ae1480846185e8803f21e9f2b721@10.155.8.40:5060;transport=udp">sip:43f0ae1480846185e8803f21e9f2b721@10.155.8.40:5060;transport=udp</a></div>
          <div><span style="white-space:pre">     </span>caller_cseq:: 24115</div>
          <div><span style="white-space:pre">     </span>caller_route_set:: </div>
          <div><span style="white-space:pre">     </span>caller_bind_addr::
            udp:<a href="http://10.155.8.11:5060" moz-do-not-send="true">10.155.8.11:5060</a></div>
          <div><span style="white-space:pre">     </span>callee_bind_addr::
            udp:<a href="http://10.155.8.11:5060" moz-do-not-send="true">10.155.8.11:5060</a></div>
          <div><span style="white-space:pre">     </span>to_uri:: <a
              href="mailto:sip%3A2052773090@sip.dcs-staging.net"
              moz-do-not-send="true">sip:2052773090@sip.dcs-staging.net</a></div>
          <div><span style="white-space:pre">     </span>to_tag::
            sip+1+bdcd0004+2038f37c</div>
          <div><span style="white-space:pre">     </span>callee_contact::
            <a class="moz-txt-link-freetext" href="sip:ca2013e84f10348a1cc825c12562bde7@10.155.8.40:5060;transport=udp">sip:ca2013e84f10348a1cc825c12562bde7@10.155.8.40:5060;transport=udp</a></div>
          <div><span style="white-space:pre">     </span>callee_cseq:: 0</div>
          <div><span style="white-space:pre">     </span>callee_route_set:: </div>
        </div>
        <div><br>
        </div>
        <div> </div>
        <div><br>
        </div>
        <div>
          <div>Thanks!</div>
          -- <br>
          <div class="gmail-m_2252680259820329684gmail_signature">
            <div dir="ltr">Mark Blackford
              <div>Digium Cloud Services</div>
              <div>678.230.8769</div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>