<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>this suggestion to increase MAX_BRANCHES_LIMIT is wrong, its
      value is constrained to be 32 because of some tm internals which
      uses a 32 bitmap for cancelled branches in transactions. Might be
      used for other things, this came in my mind without looking at the
      code. Going over 32 will require changes in tm module, otherwise
      it will result in malfunctioning/crashes.</p>
    <p>Also, MAX_BRANCHES_LIMIT alone has no impact in memory usage,
      that is a matter of the global parameter max_branches,
      MAX_BRANCHES_LIMIT is only used to check that does not exceed it.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 12.12.22 08:14, Henning Westerholt
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DB3PR0502MB9946258DD22FA0B32E596BE3BFE29@DB3PR0502MB9946.eurprd05.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New",serif;}span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;}span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB">you are right, the maximum setting is still the
            compile time value. The default value for max_branches is
            12.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB">Regarding the increase, the obvious advice
            applies, just raise it that much as you need. It will
            increase memory usage for transaction and decrease some
            run-time performance. But if you are not getting excessive,
            it should be ok.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB">Cheers,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB">Henning<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
              lang="EN-GB">-- <o:p>
              </o:p></span></p>
          <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
              lang="EN-GB">Henning Westerholt –
            </span><span style="mso-fareast-language:EN-US"><a
                href="https://skalatan.de/blog/" moz-do-not-send="true"><span
                  style="color:#0563C1" lang="EN-GB">https://skalatan.de/blog/</span></a></span><span
              style="mso-fareast-language:EN-US" lang="EN-GB"><o:p></o:p></span></p>
          <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
              lang="EN-GB">Kamailio services –
            </span><span style="mso-fareast-language:EN-US"><a
                href="https://gilawa.com/" moz-do-not-send="true"><span
                  style="color:#0563C1" lang="EN-GB">https://gilawa.com</span></a></span><span
              style="mso-fareast-language:EN-US" lang="EN-GB"><o:p></o:p></span></p>
        </div>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-GB"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b>
              sr-users <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a>
              <b>On Behalf Of </b>Lars Jansson<br>
              <b>Sent:</b> Sunday, December 11, 2022 8:24 PM<br>
              <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
              <b>Subject:</b> Re: [SR-Users] Increase MAX_BRANCHES_LIMIT<o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
        <p style="margin-left:35.4pt">Hi Patrick,<o:p></o:p></p>
        <p style="margin-left:35.4pt">Thanks for your reply. I'm aware
          of the max_branches parameter in the config file, but my
          understanding from trial and error is that the bounds of the
          max_branches parameter is set by MAX_BRANCHES_LIMIT in
          config.h.<o:p></o:p></p>
        <p style="margin-left:35.4pt">Regards,<br>
          Lars<o:p></o:p></p>
        <div>
          <p class="MsoNormal" style="margin-left:35.4pt">Den 2022-12-10
            kl. 14:55, skrev Patrick Karton:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <div>
            <p class="MsoNormal" style="margin-left:35.4pt">Hello <o:p></o:p></p>
            <div>
              <p class="MsoNormal" style="margin-left:35.4pt">there is
                already max_branches parameter you can set in config
                file.<o:p></o:p></p>
            </div>
          </div>
          <div>
            <p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
            <div>
              <p class="MsoNormal" style="margin-left:35.4pt">Le 10 déc.
                2022 13:02, Lars Jansson
                <a href="mailto:lars.jansson@solstiernan.nu"
                  moz-do-not-send="true"><lars.jansson@solstiernan.nu></a>
                a écrit :<o:p></o:p></p>
              <blockquote style="border:none;border-left:solid #CCCCCC
                1.0pt;padding:0cm 0cm 0cm
                6.0pt;margin-left:4.8pt;margin-right:0cm">
                <div>
                  <p style="margin-left:35.4pt">Hi,<o:p></o:p></p>
                  <p style="margin-left:35.4pt">I am building a
                    configuration script where for some traffic flows
                    parallel forking will be needed, and in this case I
                    need to go beyond the default max limit of the max
                    amount of branches.<o:p></o:p></p>
                  <p style="margin-left:35.4pt">Apart from this specific
                    case the traffic load that kamailio will need to
                    handle is very low, let's say just one second here
                    and there with up to 5 concurrent calls at most.<o:p></o:p></p>
                  <p style="margin-left:35.4pt">This limit is as far as
                    I understand set here:
                    usr/local/src/kamailio-5.6/kamailio/src/core/config.h<o:p></o:p></p>
                  <p style="margin-left:35.4pt">And the default limit
                    is:<br>
                    #define MAX_BRANCHES_LIMIT              32     
                    /*!< limit of maximum number of branches per
                    transaction */<o:p></o:p></p>
                  <p style="margin-left:35.4pt">Here are the questions I
                    have related to this:<o:p></o:p></p>
                  <p style="margin-left:35.4pt">1) If I increase the
                    value of this constant in config.h, how high is it
                    reasonable to set this value and still have a stable
                    system?<o:p></o:p></p>
                  <p style="margin-left:35.4pt">2) If I increase
                    MAX_BRANCHES_LIMIT beyond 32, are there also other
                    parameters that needs to be changed for the system
                    to be able to cope, and if so which parameters?<o:p></o:p></p>
                  <p style="margin-left:35.4pt">Regards,<br>
                    Lars<o:p></o:p></p>
                </div>
              </blockquote>
            </div>
            <p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
          </div>
          <p class="MsoNormal" style="margin-left:35.4pt"><br>
            <br>
            <o:p></o:p></p>
          <pre style="margin-left:35.4pt">__________________________________________________________<o:p></o:p></pre>
          <pre style="margin-left:35.4pt">Kamailio - Users Mailing List - Non Commercial Discussions<o:p></o:p></pre>
          <pre style="margin-left:35.4pt"><a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true" class="moz-txt-link-freetext">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
          <pre style="margin-left:35.4pt">Important: keep the mailing list in the recipients, do not reply only to the sender!<o:p></o:p></pre>
          <pre style="margin-left:35.4pt">Edit mailing list options or unsubscribe:<o:p></o:p></pre>
          <pre style="margin-left:35.4pt"><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
        </blockquote>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
<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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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></pre>
  </body>
</html>