[asterisk-dev] IAX2 very CPU hungry

Tim Panton tim at mexuar.com
Fri Nov 24 16:18:46 MST 2006


On 24 Nov 2006, at 21:22, Derek Smithies wrote:

> Hi,
>  If you look at a voip call, most of the work is in processing the  
> audio
> packets. Call setup is minor.
>
> The IAX2 media packets are slightly simpler to decode that SIP,  so  
> what
> is making the IAX2 more cpu hungry?
> We have discussed codecs - and that is not the problem.
> What about packet count? If one voip format is sending more packets  
> than
> the other (SIP is putting more ms of audio per packet), the iax2  
> code has
> to work harder as it has more packets to process. But, it is not  
> going to
> be too much more work to process more media packets. This will not  
> account
> for the big cpu usage differential.
>
> However, I think the real answer will be found from doing a packet  
> dump,
> and following the media streams with ethereal. My guess is that  
> something
> is not right with the iax2 call, and there are a lot of control  
> packets
> being sent. Alternatively, some packets are being dropped and iax2  
> is not
> coping with this. IAX2 is having to generate lots and lots of control
> packets and do retrys and working the cpu hard.
>
> Derek.

IAX's repeated registrations every 30 seconds are know to be expensive.
Current thinking is to re-register much less often, but to use ping  
packets
to 'qualify' the link, which is more like SIP's standard method.



Tim Panton

www.mexuar.net
www.westhawk.co.uk/





More information about the asterisk-dev mailing list