Hello, I have been testing a trunk IAX and another SIP, using sipp to generate SIP calls to a Asterisk box. The testing dialplan just connects to another Asterisk box, who answers the call and playback some files. I noticed that the cpu load is higher when I use an IAX, about 90% for 25 simultaneous calls. In the other hand, with a SIP trunk the cpu load was about the half or less. In both cases the Asterisk box was in the middle of the RTP path, and both the trunk and the sip client had the same codec, ulaw. Does it make sense? Why is IAX demanding so much cpu load?
On 7 Sep 2008, at 21:34, Edgar Guadamuz wrote:> Hello, > > I have been testing a trunk IAX and another SIP, using sipp to > generate SIP calls to a Asterisk box. > > > The testing dialplan just connects to another Asterisk box, who > answers the call and playback some files. > > I noticed that the cpu load is higher when I use an IAX, about 90% for > 25 simultaneous calls. In the other hand, with a SIP trunk the cpu > load was about the half or less. > > In both cases the Asterisk box was in the middle of the RTP path, and > both the trunk and the sip client had the same codec, ulaw. > > Does it make sense? Why is IAX demanding so much cpu load?Which Asterisk version are you running? There was a specific version (1.4.20 I think) that had made IAX super-expensive. The most recent versions of asterisk _should_ have IAX being roughly equivalent in CPU usage as SIP Incidentally if anyone has comparative numbers for IAX vs SIP on 1.6 betas (or hyper-recent 1.4) I'd love to have them for a talk I'm doing at astricon. Tim.
Hi, Just to review the test I did: ----------- SIP extension ------------------ Trunk ----------------- | SIPp |<----------------------->| Asterisk 1 |<---------------->| Asterisk 2 | ----------- ------------------- ------------------ Both Asterisk boxes are virtual machines in VirtualBox and version 1.4.21.2. I generated calls using SIPp, and I monitored the cpu utilization in the Asterisk 1 with top. I compare the cpu utilization when I used IAX and when I used SIP as Trunk protocol. The following are the results (averages) I got with ulaw codecs in both sides: Calls IAX SIP 4 6,0 1,8 10 9,2 4,6 20 19,5 8,6 30 28,2 13,5 34 36,9 16,2 40 38,2 19,5 50 36,9 24,3 As you can see, IAX almost doubles the cpu cycles. I repeated the test using gsm as the trunk codec, and in this scenario IAX shows a better performance (Sip extension continues with ulaw): IAX SIP 1,8 25,7 12,8 41,5 29,2 47,0 45,7 69,4 54,2 78,5 53,3 83,3 65,7 87,1 And finally I repeated with iLBC in the trunk, and SIP won again: IAX SIP 8,5 9,4 29,3 14,5 57,6 23,6 74,4 37,3 84,3 41,5 -- 51,2 -- 67,0 Does this makes sense? Any feedback? Has anybody done similar test for comparison?