RE: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-16 Thread Colin Anderson
>Why not do this when starting asterisk ?
>taskset 0x0003 -- /usr/sbin/asterisk -p

For some reason, I have to specify PID on my version of taskset, so I have
to grep it out. 
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-16 Thread Paul Hewlett
On Tuesday 13 June 2006 17:47, Dinesh Nair wrote:
> On 06/13/06 22:49 Colin Anderson said the following:
> > 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
>
> isnt asterisk multithreaded ? on a proper OS thread implementation, threads
> can migrate across CPUs, can't they ?

   From research (and not from experience) it seems that trying to put 
different threads on different CPUs has limited advantages due to data 
locality issues - this evidently has something to do with the current Intel 
architecture and its use of L1 and L2 caches.
  
   asterisk would have benefited in this case from using full processes that 
could have been individually affined to different CPU's instead of threads. 
How much difference this would have made is debatable.

  AFAIK, linux runs all threads of a process (such as asterisk) on the same 
CPU.

Paul Hewlett
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-16 Thread Paul Hewlett
On Tuesday 13 June 2006 16:49, Colin Anderson wrote:


> 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). 

   This is because HT machines still only have 1 floating point unit - 
transcoding uses FP (particularly if MMX is enabled) and any advantage from 
executing 2 threads at once is lost when bottlenecking at the FPU.

True SMP has an FPU per processor so this does not then apply
 
> 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 0x0003 -p  ${ASTERISKPID:0:5}

  Why not do this when starting asterisk ?

   taskset 0x0003 -- /usr/sbin/asterisk -p

>
> This "pins" Asterisk to CPU # 4 on a 4 way system. Repeat for all other
> processes, to different CPU's with the affinity mask:
>
> 0x = CPU 1
> 0x0001 = CPU 2
> 0x0002 = CPU 3
> 0x0003 = CPU 4

   It is better to use the 'isolcpus' kernel parameter at bootup to disable a 
particular CPU and then put asterisk on that CPU. Trying to set CPU affinity 
for all other processes evidently has problems... 

Also later kernels now support the concept of 'sets' similar to solaris. 

Paul Hewlett

>
>
> -Original Message-
> From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]
> 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
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Mike Fedyk

Patrick wrote:

On Tue, 2006-06-13 at 23:47 +0800, Dinesh Nair wrote:
  

On 06/13/06 22:49 Colin Anderson said the following:


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
  
isnt asterisk multithreaded ? on a proper OS thread implementation, threads 
can migrate across CPUs, can't they ?



Afaik in 1.2.x IAX is single threaded. In 1.4 it is multithreaded.
In 1.2.x IAX uses two threads.  One to send, and one to receive.  In 1.4 
it will use more threads, but I don't know what the new threading model 
for IAX will be though.

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Mike Lynchfield
No way.. im keeping it.. be uptime since.. let me see..uptime 13:12:56  up 587 days,  13 users,  load average: 0.11, 0.02, 0.01i think i got an old sun laying around in the noc that been just compiling since 1973..
lol nah but i remember the old days when a password leak on our hosting clients would generate loads of 400-500 and would take around 10 minutes to type stop httpd10 chars..but then again if i cold shut .. would take 21 minutes to reboot..
the darn thing weighted around 50 pounds and was the best thing iv seen as far as load ocud handle..that 500 load was around 25000 simult users grabbing web pages..when we replaced with pentium crap it could handle a load of 10-20 not more.
last uptime on it was 800+ days lol.. soon its 3rd birtday.. never changed a thing on it.. actually i rebooted it then for moving it.On 6/13/06, 
Colin Anderson <[EMAIL PROTECTED]> wrote:







2002 
called. They want their operating system back. :- ) > 

  -Original Message-From: Mike Lynchfield 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, June 13, 2006 9:42 
  AMTo: Asterisk Users Mailing List - Non-Commercial 
  DiscussionSubject: Re: [Asterisk-Users] IAX2 Vs SIP cpu 
  loadtaskset does not seem to exist on redhad 9 nor 
  freebsd..;)
  On 6/13/06, Zoa 
  <[EMAIL PROTECTED]> wrote: 
  
  When 
i did this test ages ago, i found out that iax was worse than sip,but 
sip was worse than trunked iax. Joachimolin 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 0x0003 -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:>> 
0x = CPU 1> 0x0001 = CPU 2 > 0x0002 = CPU 
3> 0x0003 = CPU 4>>> -Original 
Message-> From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]]> 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>>> 
___--Bandwidth 
and Colocation provided by Easynews.com 
--Asterisk-Users mailing listTo UNSUBSCRIBE or update options 
visit:    http://lists.digium.com/mailman/listinfo/asterisk-users
-- MikeSales Managerhttp://www.theclubvoip.comMaking it 
  happen1.888.470.7253 

___--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:   
http://lists.digium.com/mailman/listinfo/asterisk-users-- MikeSales Managerhttp://www.theclubvoip.comMaking it happen
1.888.470.7253
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Patrick
On Tue, 2006-06-13 at 23:47 +0800, Dinesh Nair wrote:
> On 06/13/06 22:49 Colin Anderson said the following:
> > 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
> 
> isnt asterisk multithreaded ? on a proper OS thread implementation, threads 
> can migrate across CPUs, can't they ?

Afaik in 1.2.x IAX is single threaded. In 1.4 it is multithreaded.

Regards,
Patrick

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Colin Anderson
There is work by the devs to threading in the IAX and SIP channels, I
believe. I don't know if it's made it's way back to -HEAD or not, maybe kpf
can give a definitive answer. I remember reading something by Mark S earlier
this year that he had IAX threading working. 

-Original Message-
From: Dinesh Nair [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 13, 2006 9:47 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] IAX2 Vs SIP cpu load



On 06/13/06 22:49 Colin Anderson said the following:
> 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

isnt asterisk multithreaded ? on a proper OS thread implementation, threads 
can migrate across CPUs, can't they ?

-- 
Regards,   /\_/\   "All dogs go to heaven."
[EMAIL PROTECTED](0 0)   http://www.openmalaysiablog.com/
+==oOO--(_)--OOo==+
| for a in past present future; do|
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo "The opinions here in no way reflect the opinions of my $a $b."  |
| done; done  |
+=+
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Dinesh Nair


On 06/13/06 22:49 Colin Anderson said the following:

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


isnt asterisk multithreaded ? on a proper OS thread implementation, threads 
can migrate across CPUs, can't they ?


--
Regards,   /\_/\   "All dogs go to heaven."
[EMAIL PROTECTED](0 0)   http://www.openmalaysiablog.com/
+==oOO--(_)--OOo==+
| for a in past present future; do|
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo "The opinions here in no way reflect the opinions of my $a $b."  |
| done; done  |
+=+
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Zoa


Go to: 
http://www.asteriskguru.com/tutorials/pci_irq_apic_tdm_ticks_te410p_te405p_noise.html 
and search for "affinity", iirc i explain there how to do it with echo 
instead of tasksel.


Zoa

Colin Anderson wrote:

2002 called. They want their operating system back. :- ) >

-Original Message-
*From:* Mike Lynchfield [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, June 13, 2006 9:42 AM
*To:* Asterisk Users Mailing List - Non-Commercial Discussion
    *Subject:* Re: [Asterisk-Users] IAX2 Vs SIP cpu load

taskset does not seem to exist on redhad 9 nor freebsd..

;)

On 6/13/06, *Zoa* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:



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 0x0003 -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:
>
> 0x = CPU 1
> 0x0001 = CPU 2
> 0x0002 = CPU 3
> 0x0003 = CPU 4
>
>
> -Original Message-
> From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>]
> 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
>
>
>


___
--Bandwidth and Colocation provided by Easynews.com
<http://Easynews.com> --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Mike

Sales Manager
http://www.theclubvoip.com
Making it happen
1.888.470.7253 




___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
  


___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Steven Ringwald

Mike Lynchfield wrote:

taskset does not seem to exist on redhad 9 nor freebsd..

;)

On Fedora Core 4, it is provided by the schedutils RPM.

Steve

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Colin Anderson



2002 
called. They want their operating system back. :- ) > 

  -Original Message-From: Mike Lynchfield 
  [mailto:[EMAIL PROTECTED]Sent: Tuesday, June 13, 2006 9:42 
  AMTo: Asterisk Users Mailing List - Non-Commercial 
  DiscussionSubject: Re: [Asterisk-Users] IAX2 Vs SIP cpu 
  loadtaskset does not seem to exist on redhad 9 nor 
  freebsd..;)
  On 6/13/06, Zoa 
  <[EMAIL PROTECTED]> wrote: 
  
  When 
i did this test ages ago, i found out that iax was worse than sip,but 
sip was worse than trunked iax. Joachimolin 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 0x0003 -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:>> 
0x = CPU 1> 0x0001 = CPU 2 > 0x0002 = CPU 
3> 0x0003 = CPU 4>>> -Original 
Message-> From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]]> 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>>> 
___--Bandwidth 
and Colocation provided by Easynews.com 
--Asterisk-Users mailing listTo UNSUBSCRIBE or update options 
visit:    http://lists.digium.com/mailman/listinfo/asterisk-users-- MikeSales Managerhttp://www.theclubvoip.comMaking it 
  happen1.888.470.7253 
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Mike Lynchfield
taskset does not seem to exist on redhad 9 nor freebsd..;)On 6/13/06, Zoa <[EMAIL PROTECTED]> wrote:
When i did this test ages ago, i found out that iax was worse than sip,but sip was worse than trunked iax.
Joachimolin 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 0x0003 -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:>> 0x = CPU 1> 0x0001 = CPU 2
> 0x0002 = CPU 3> 0x0003 = CPU 4>>> -Original Message-> From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]]> 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>>>
___--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users-- MikeSales Manager
http://www.theclubvoip.comMaking it happen1.888.470.7253
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Zoa



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 0x0003 -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:

0x = CPU 1
0x0001 = CPU 2
0x0002 = CPU 3
0x0003 = CPU 4


-Original Message-
From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]
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


  



___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Colin Anderson
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 0x0003 -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:

0x = CPU 1
0x0001 = CPU 2
0x0002 = CPU 3
0x0003 = CPU 4


-Original Message-
From: Jon Schøpzinsky [mailto:[EMAIL PROTECTED]
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


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.3/362 - Release Date: 12-06-2006
 
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] IAX2 Vs SIP cpu load

2006-06-13 Thread Mike Lynchfield
dual support yes.. however i read a few articles on the fuct that single with double the ram is better..something about the bus or sshare between both processors i think.i would go AMD opteron, but that me.
or sunOn 6/13/06, Jon Schøpzinsky <[EMAIL PROTECTED]> wrote:
HelloIs 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?
RegardsJon--No virus found in this outgoing message.Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.8.3/362 - Release Date: 12-06-2006___
--Bandwidth and Colocation provided by Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:   
http://lists.digium.com/mailman/listinfo/asterisk-users-- MikeSales Managerhttp://www.theclubvoip.comMaking it happen
1.888.470.7253
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users