<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:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1310356168;
mso-list-type:hybrid;
mso-list-template-ids:-504485604 1471575496 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"\(%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> One other thing. I use a package called AGISpeedy. Its available for both Perl and PHP and I’ve used it for years without any problems. Its supposedly an order of magnitude faster than regular FastAGI scripts. The only downside is that it hasn’t been maintained a while, but the package is solid and really doesn’t need much maintaining. I’ll probably write the author and see if I can keep it updated for him.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regards;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>John <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> asterisk-users <asterisk-users-bounces@lists.digium.com> <b>On Behalf Of </b>Tech Support<br><b>Sent:</b> Friday, September 20, 2019 1:37 PM<br><b>To:</b> 'Asterisk Users Mailing List - Non-Commercial Discussion' <asterisk-users@lists.digium.com><br><b>Subject:</b> Re: [asterisk-users] Load issues using AGI<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hello;<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> What programming language are you using? If you are using Perl, then I can suggest this.<o:p></o:p></span></p><p class=MsoListParagraph style='text-align:justify;text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><span style='mso-list:Ignore'>(1)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>You are going to have to profile your scripts. This is a must. Without profiling, you don’t know what the problem is. In my opinion, Devel::NYTProf is the king of that hill. It could be as simple as optimizing a single subroutine. Then you will know exactly what the problem is. <o:p></o:p></span></p><p class=MsoListParagraph style='text-align:justify;text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><span style='mso-list:Ignore'>(2)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>See which version of Perl are you running and see if upgrading it solves your problems. The easiest way is to download the newest Perl they support from ActiveState.com. It creates a completely independent installation in /opt which will not interfere with your system Perl. You can also compile and install the newest Perl from source completely separate from your system Perl. That’s what I do. I have a couple of scripts to automate that process. If you first get a list of your installed modules using ‘perlmod’, you can clean up the output a bit and pipe that to cpanm to make sure that you have all the modules you need. <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.25in;text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.25in;text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>If you are using PHP, then I’m sure that the above still applies, but PHP is not my area of expertise. <o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regards;<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>John V.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.25in;text-align:justify'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> asterisk-users <<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>> <b>On Behalf Of </b>Jöran Vinzens<br><b>Sent:</b> Friday, September 20, 2019 12:47 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>><br><b>Subject:</b> [asterisk-users] Load issues using AGI<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi all,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>we have just upgraded from Asterisk 11 to Asterisk 16.<o:p></o:p></p></div><div><p class=MsoNormal>After porting all the config to 16 we figured out some major load problems.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>the majority running of our Asterisk instances is still having Asterisk 11 so we can compare load handling on both versions.<o:p></o:p></p></div><div><p class=MsoNormal>On the same hardware configuration we see load differences that Asterisk 16 takes four times the load as Asterisk 11 (on 11 we see load 0.5, on 16 we see something around 2).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Our asterisk is only handling Calls, so there are no Subscription no Registration etc.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>After some testing we figured out if we eliminate AGI Apps from Dialplan we reduce the load significantly.<o:p></o:p></p></div><div><p class=MsoNormal>At the moment we have 6 AGI calls for one single call. If we eliminate 3 of them we reduce the load by half.<o:p></o:p></p></div><div><p class=MsoNormal>I also tried to have the AGI replaced by some fake AGI which returns immediately to make sure it is not related to long running AGI Scripts but this made no difference.<o:p></o:p></p></div><div><p class=MsoNormal>I tried to tweaked a bit manipulating the thread limitations in stasis.conf but it had no significant effect on load.<o:p></o:p></p></div><div><p class=MsoNormal>Also I tried to "decline" all non AGI messages in stasis.conf. It seems it has very little effect.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Does anyone have similar issues or a solution?<o:p></o:p></p></div><div><p class=MsoNormal>Is there anyone who calls AGI several times during call establishment?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>any hin and help would be very much appreciated!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I am happy to share more config and information if it helps to find a solution.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><pre>Jöran Vinzens - <a href="mailto:vinzens@sipgate.de" target="_blank">vinzens@sipgate.de</a><br><br><br>sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf<br>HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois<br>Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391<br><br><a href="http://www.sipgate.de" target="_blank">www.sipgate.de</a> - <a href="http://www.sipgate.co.uk" target="_blank">www.sipgate.co.uk</a><o:p></o:p></pre></div></div></div></div></div></body></html>