Asterisk hardware interrupts

Asterisk and IRQs

Reference:
http://www.microsoft.com/whdc/system/sysperf/apic.mspx

With multiple Zaptel cards, and sometimes just one, the most common issues are interrupt-related. The limitation with the number of cards is interrupts, not PCI slots. As the above article explains, sharing interrupts adds a signifigant amount of latency to the interrupt, causing audio droupouts and other weird stuff to happen. It is nothing specific to Digium hardware or Linux or anything like that. On a desktop running Windows (or any other OS) with a lot of devices try to play back an MP3 and generate network, disk, and other I/O activity on a machine without APIC - the audio WILL skip. Now imagine you are trying to drive 96 or more T1 channels (more than one te405/te410p), ethernet boards and who knows how much else. You can see where there might be a problem.

Apple Mac's have interrupts. They just have a lot of them. That is why they do much better with multiple Zaptel cards, or even just one. But, a modern Mac is very similar when compared to a modern x86 with an APIC. Read more.

The interrupt problem is being mitigated on the x86 architecture by the APIC - Advanced Processor Interrupt Controller. You can have more than one APIC in a machine, and each APIC has 24 available IRQs. Most new motherboards have at least one APIC/processor.

Here is some output from two of my machines demonstrating this:

Dell PowerEdge 2850 (dual Xeon):


ast1 etc # uname -a
Linux ast1 2.6.9-pe2850a #2 SMP Fri Dec 3 09:23:03 CST 2004 i686 Intel(R) Xeon(TM) CPU 3.00GHz GenuineIntel GNU/Linux
ast1 etc # cat /proc/interrupts
           CPU0       CPU1
  0:    6184515         72    IO-APIC-edge  timer
  1:          8          1    IO-APIC-edge  i8042
  9:          0          0   IO-APIC-level  acpi
 12:         65          1    IO-APIC-edge  i8042
 14:         11          2    IO-APIC-edge  ide0
 46:      19595          1   IO-APIC-level  megaraid
 64:      66366          1   IO-APIC-level  eth0
 65:      77045          1   IO-APIC-level  eth1
101:    6113521          1   IO-APIC-level  wctdm
NMI:          1          0
LOC:    6184694    6184698
ERR:          0
MIS:          0
ast1 etc #



Apple Macintosh G4:


[root@localhost root]# uname -a
Linux localhost.localdomain 2.6.8-1.ydl.7 #1 Wed Sep 22 18:46:40 EDT 2004 ppc ppc ppc GNU/Linux
[root@localhost root]# cat /proc/interrupts
           CPU0
 19:       4540   OpenPIC   Level     ide0
 20:         12   OpenPIC   Level     ide1
 25:        318   OpenPIC   Level     VIA-PMU
 26:          0   OpenPIC   Level     keywest i2c
 27:         35   OpenPIC   Level     ohci_hcd
 28:         97   OpenPIC   Level     ohci_hcd
 41:       1248   OpenPIC   Level     eth0
 42:          0   OpenPIC   Level     keywest i2c
 47:          0   OpenPIC   Level     GPIO1/ADB
 54:   19036943   OpenPIC   Level     wctdm
 55:          0   OpenPIC   Edge      NMI - XMON
 63:          3   OpenPIC   Level     ohci1394
BAD:          0
[root@localhost root]#



As you can see, on the Dell, the wctdm board has IRQ 101. Waaaaayyyyy past good ol' 15. On the Mac, it is at 54. Still way beyond the standard x86 15 limit.

Even in Windows, my audio card has IRQ 22 right now. This is all because of APIC.

Now, if you are using an OS that can't do APIC on x86, or have a motherboard that has a mal-functioning APIC, you are out of luck and have to try to get them all to play nice. I hope that this clears things up some.

See also



Go back to Asterisk hardware

Asterisk and IRQs

Reference:
http://www.microsoft.com/whdc/system/sysperf/apic.mspx

With multiple Zaptel cards, and sometimes just one, the most common issues are interrupt-related. The limitation with the number of cards is interrupts, not PCI slots. As the above article explains, sharing interrupts adds a signifigant amount of latency to the interrupt, causing audio droupouts and other weird stuff to happen. It is nothing specific to Digium hardware or Linux or anything like that. On a desktop running Windows (or any other OS) with a lot of devices try to play back an MP3 and generate network, disk, and other I/O activity on a machine without APIC - the audio WILL skip. Now imagine you are trying to drive 96 or more T1 channels (more than one te405/te410p), ethernet boards and who knows how much else. You can see where there might be a problem.

Apple Mac's have interrupts. They just have a lot of them. That is why they do much better with multiple Zaptel cards, or even just one. But, a modern Mac is very similar when compared to a modern x86 with an APIC. Read more.

The interrupt problem is being mitigated on the x86 architecture by the APIC - Advanced Processor Interrupt Controller. You can have more than one APIC in a machine, and each APIC has 24 available IRQs. Most new motherboards have at least one APIC/processor.

Here is some output from two of my machines demonstrating this:

Dell PowerEdge 2850 (dual Xeon):


ast1 etc # uname -a
Linux ast1 2.6.9-pe2850a #2 SMP Fri Dec 3 09:23:03 CST 2004 i686 Intel(R) Xeon(TM) CPU 3.00GHz GenuineIntel GNU/Linux
ast1 etc # cat /proc/interrupts
           CPU0       CPU1
  0:    6184515         72    IO-APIC-edge  timer
  1:          8          1    IO-APIC-edge  i8042
  9:          0          0   IO-APIC-level  acpi
 12:         65          1    IO-APIC-edge  i8042
 14:         11          2    IO-APIC-edge  ide0
 46:      19595          1   IO-APIC-level  megaraid
 64:      66366          1   IO-APIC-level  eth0
 65:      77045          1   IO-APIC-level  eth1
101:    6113521          1   IO-APIC-level  wctdm
NMI:          1          0
LOC:    6184694    6184698
ERR:          0
MIS:          0
ast1 etc #



Apple Macintosh G4:


[root@localhost root]# uname -a
Linux localhost.localdomain 2.6.8-1.ydl.7 #1 Wed Sep 22 18:46:40 EDT 2004 ppc ppc ppc GNU/Linux
[root@localhost root]# cat /proc/interrupts
           CPU0
 19:       4540   OpenPIC   Level     ide0
 20:         12   OpenPIC   Level     ide1
 25:        318   OpenPIC   Level     VIA-PMU
 26:          0   OpenPIC   Level     keywest i2c
 27:         35   OpenPIC   Level     ohci_hcd
 28:         97   OpenPIC   Level     ohci_hcd
 41:       1248   OpenPIC   Level     eth0
 42:          0   OpenPIC   Level     keywest i2c
 47:          0   OpenPIC   Level     GPIO1/ADB
 54:   19036943   OpenPIC   Level     wctdm
 55:          0   OpenPIC   Edge      NMI - XMON
 63:          3   OpenPIC   Level     ohci1394
BAD:          0
[root@localhost root]#



As you can see, on the Dell, the wctdm board has IRQ 101. Waaaaayyyyy past good ol' 15. On the Mac, it is at 54. Still way beyond the standard x86 15 limit.

Even in Windows, my audio card has IRQ 22 right now. This is all because of APIC.

Now, if you are using an OS that can't do APIC on x86, or have a motherboard that has a mal-functioning APIC, you are out of luck and have to try to get them all to play nice. I hope that this clears things up some.

See also



Go back to Asterisk hardware

Created by: krisk17, Last modification: Tue 12 of Jun, 2012 (03:22 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+