[asterisk-users] Load issues using AGI

Joshua C. Colp jcolp at digium.com
Fri Sep 20 12:33:51 CDT 2019

On Fri, Sep 20, 2019, at 1:46 PM, J├Âran Vinzens wrote:
> Hi all,
> we have just upgraded from Asterisk 11 to Asterisk 16.
> After porting all the config to 16 we figured out some major load problems.
> the majority running of our Asterisk instances is still having Asterisk 
> 11 so we can compare load handling on both versions.
> 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).
> Our asterisk is only handling Calls, so there are no Subscription no 
> Registration etc.
> After some testing we figured out if we eliminate AGI Apps from 
> Dialplan we reduce the load significantly.
> At the moment we have 6 AGI calls for one single call. If we eliminate 
> 3 of them we reduce the load by half.
> 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.
> I tried to tweaked a bit manipulating the thread limitations in 
> stasis.conf but it had no significant effect on load.
> Also I tried to "decline" all non AGI messages in stasis.conf. It seems 
> it has very little effect.
> Does anyone have similar issues or a solution?
> Is there anyone who calls AGI several times during call establishment?
> any hin and help would be very much appreciated!
> I am happy to share more config and information if it helps to find a solution.

Is this AGI or FastAGI? If AGI then moving to FastAGI will likely improve things. This is because when executing an AGI script the kernel has to fork the process which depending on memory consumption can take some time and drive up load. FreePBX ran into this problem[1] and it additionally caused audio issues in certain cases for them.

[1] https://www.freepbx.org/performance-improvements-in-freepbx/

Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

More information about the asterisk-users mailing list