[asterisk-dev] How to nice agi scripts?

Steven critch at basesys.com
Fri Mar 24 07:37:56 MST 2006


On Fri, 2006-03-24 at 10:44 +0100, Roger Schreiter wrote:
> Hi,
> 
> I have unpleasent short audio gaps when a
> perl based agi scripts starts.
> 
> Thus, I now started to put all those things in C programmed
> daemons for fast-agi.
> 
> Anyway I'm looking for another mean, which would help me
> more quickly.
> 
> I noticed, that all agi scripts are running with system
> priority -11, like asterisk does. This is really waste of
> priority. I would like to have the AGI scripts running with
> much lower priority than asterisk.
> 
> Is there any mean to let AGI scripts run in a lower
> priority (except starting a new shell from the a short
> initial AGI script)?

Posting here due to the stupid spam filter that produced this result
while trying to send this directly to Roger...
550_Antispam:_Helo_domain's_IP_(216.148.227.153)_is_too_far_away_from_your_server's_(204.127.192.83)_for_this_recipient_-_consult_your_system_administrator

You might be running an older version of asterisk. We also had the same
problem as it started to get more use. We found that when asterisk was
used with realtime privleges, the agi apps inherited that priority. Ths
meant our slightly heavy perl app would bog down the machine when it
started up and parsed our app. We submitted a patch and had it accepted
to turn of realtime priority for the agi spawned thread. This eliminated
our problem with skipping audio on start up.


-- 
Steven <critch at basesys.com>




More information about the asterisk-dev mailing list