[Asterisk-Users] IAX2 Vs SIP cpu load
Zoa
zoachien at securax.org
Tue Jun 13 08:30:14 MST 2006
When i did this test ages ago, i found out that iax was worse than sip,
but sip was worse than trunked iax.
Joachim
olin Anderson wrote:
> I use IAX2 quite a bit and I haven't really noticed any difference between
> IAX2 and SIP. CPU usage in Asterisk is aggravated by transcoding, changing
> one audio format to another, and SIP or IAX2 is simply the protocol used to
> carry the audio. Any function of Asterisk will be affected by high system
> load; if you have a loadaverage of 3, for example, your box is in trouble
> regardless of the protocol used.
>
> Although this may have changed in the newer 1.2.X series of Asterisk, I
> believe that Asterisk does not support SMP from the perspective of
> dispatching *internal* processes to different CPU's, instead, *external*
> processes such as AGI's are balanced out and dispatched automatically to
> different CPU's - but this is a kernel thing.
>
> It's generally well-known that a "fake" SMP machine such as a HyperThreading
> CPU affects Asterisk negatively, and best practice is to disable
> HyperThreading. However, "real" SMP machines have no trouble (I use a 4 way
> Xeon). It's possible to "pin" a process to a specific CPU, and in fact, I do
> this to force Asterisk to it's own CPU, and pin all other processes to a
> specific CPU that Asterisk does *not* use:
>
> setasteriskaffinity.sh:
>
> #!/bin/bash
> ASTERISKPID=`ps -A | grep -a -A0 "asterisk"`
> taskset 0x00000003 -p ${ASTERISKPID:0:5}
>
> This "pins" Asterisk to CPU # 4 on a 4 way system. Repeat for all other
> processes, to different CPU's with the affinity mask:
>
> 0x00000000 = CPU 1
> 0x00000001 = CPU 2
> 0x00000002 = CPU 3
> 0x00000003 = CPU 4
>
>
> -----Original Message-----
> From: Jon Schøpzinsky [mailto:jos at detele.dk]
> Sent: Tuesday, June 13, 2006 8:14 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] IAX2 Vs SIP cpu load
>
>
> Hello
>
> Is it correct that IAX2 uses more CPU, than SIP? Also, can it be true that
> IAX2 is much more sensitive against high CPU loads?
> Also, does Asterisk support and use multiprocessor architectures, such as
> Xeon?
>
>
> Regards
> Jon
>
>
>
More information about the asterisk-users
mailing list