[asterisk-dev] IAX2 very CPU hungry

Derek Smithies derek at indranet.co.nz
Fri Nov 24 14:22:44 MST 2006


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.

On Fri, 24 Nov 2006, Mark Rounds wrote:

> Another thing to consider is do you have sip re-invites turned on.  This
> would keep sip calls from coming back to the Asterisk server by letting the
> RTP Streams go directly from phone to phone.  Not sure if IAX2 has this
> functionality, as I don't use IAX2 due to I'm only supporting Cisco and
> Linksys IP Phones.  Something to think about.
> 
> Mark
> 
> 
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com
> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Anton
> Sent: Thursday, November 23, 2006 10:25 PM
> To: Asterisk Developers Mailing List
> Subject: Re: [asterisk-dev] IAX2 very CPU hungry
> 
> On 23 November 2006 01:13, Martin Vít wrote:
> > Anton wrote:
> > > Hi!
> > >
> > > Just changed the protocol when P4-3Ghz (1.2.12.1) box
> > > have been dying receiving 60-IAX2 with 100% load of
> > > asterisk process, and changed the protocol to SIP -
> > > Load decreased to under 50%!
> >
> > Do you have turned on hyperthreading?
> > Codec is alaw or some compression?
> 
> That true for PC both with with HT or P4-D (though P4D has 
> better performance.) No compression, ULAW. In any case SIP 
> eats MUCH less CPU than IAX2
> 
> >
> > > So seems implementation of IAX2 far no so
> > > good as SIP implementation. Any hope to get IAX2 
> > > better in 1.4?
> > > _______________________________________________
> > > --Bandwidth and Colocation provided by Easynews.com --
> > >
> > > asterisk-dev mailing list
> > > To UNSUBSCRIBE or update options visit:
> > >   
> > > http://lists.digium.com/mailman/listinfo/asterisk-dev
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
> 
> 
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
> 

-- 
Derek Smithies Ph.D.
IndraNet Technologies Ltd.
Email: derek at indranet.co.nz
ph +64 3 365 6485
Web: http://www.indranet-technologies.com/


More information about the asterisk-dev mailing list