<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
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-MailFormatvorlage22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Daniel,<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 lang="EN-GB" style="mso-fareast-language:EN-US">thanks for the clarification, I was seeing that it’s used in TM, but did not check about the allocation/internal data structure topic.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><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 <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Daniel-Constantin Mierla<br>
<b>Sent:</b> Monday, December 12, 2022 8:32 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><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">Hello,<o:p></o:p></p>
<p style="margin-left:35.4pt">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.<o:p></o:p></p>
<p style="margin-left:35.4pt">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.<o:p></o:p></p>
<p style="margin-left:35.4pt">Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On 12.12.22 08:14, Henning Westerholt wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US">Hello,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">you are right, the maximum setting is still the compile time value. The default value for max_branches is 12.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">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.</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">--
</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt –
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services –
</span><span style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1">https://gilawa.com</span></a></span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt"><b>From:</b> sr-users <a 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 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:70.8pt"> <o:p></o:p></p>
<p style="margin-left:70.8pt">Hi Patrick,<o:p></o:p></p>
<p style="margin-left:70.8pt">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:70.8pt">Regards,<br>
Lars<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">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:70.8pt">Hello <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">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:70.8pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">Le 10 déc. 2022 13:02, Lars Jansson
<a href="mailto:lars.jansson@solstiernan.nu"><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-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p style="margin-left:70.8pt">Hi,<o:p></o:p></p>
<p style="margin-left:70.8pt">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:70.8pt">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:70.8pt">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:70.8pt">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:70.8pt">Here are the questions I have related to this:<o:p></o:p></p>
<p style="margin-left:70.8pt">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:70.8pt">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:70.8pt">Regards,<br>
Lars<o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:70.8pt"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
<br>
<br>
<o:p></o:p></p>
<pre style="margin-left:70.8pt">__________________________________________________________<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Kamailio - Users Mailing List - Non Commercial Discussions<o:p></o:p></pre>
<pre style="margin-left:70.8pt"><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
<pre style="margin-left:70.8pt">Important: keep the mailing list in the recipients, do not reply only to the sender!<o:p></o:p></pre>
<pre style="margin-left:70.8pt">Edit mailing list options or unsubscribe:<o:p></o:p></pre>
<pre style="margin-left:70.8pt"><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<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">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">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</body>
</html>