[Asterisk-Users] te110p and interrupts
Paul Hewlett
paul at cottonpickinminds.co.za
Sun Apr 16 07:57:34 MST 2006
On Tuesday 11 April 2006 21:45, Begumisa Gerald M wrote:
> Hi,
>
> I've been battling with a similar issue:
>
> a) I wrote a script to periodically run the command "cat
> /proc/interrupts" and figure out the interrupts per second. I run this
> script for over 24 hours and never once did the difference between the
> preceeding and succeeding interrupt counts go below 1005 (wierd result
> because of (b) below);
>
> b) zttest was reporting very bad results;
>
> c) lspci -vb was reporting that the TE110P shared an IRQ with the Gigabit
> Ethernet Card (IRQ 11)
>
> d) lspci -vv was reporting that the TE110P was on an IRQ of its own ("IRQ
> 24") probably because of APIC (wierd because of (c) above);
>
> e) Users reported intermittent bad audio;
>
>
> Below are the [experimental] steps I took:
>
> a) I'm running a Dual 3.2 GHz machine - the network card is services by
> CPU0 - I set the smp_affinity value for the Digium card to be CPU1
I am curious..
Have you tried disabling CPU1 by setting isolcpus=1 on the kernel command
line ?
This will make the kernel ignore the second CPU - you can then run asterisk
on it by using the taskset command (from schedutils)
taskset 0x00000001 asterisk -p
and asterisk wlll run on a CPU all on its own. I was about to try this and
wondered if you might give it a try and report back.
>
> b) I disabled the userland 'irqbalance' process which keeps switching the
> Digium card between the CPUs
>
> c) I increased the PCI "LATENCY_TIMER" value for the TE110P to a value
> higher than the Gigabit Card.
>
>
> So far, things are looking quite good - zttest is reporting very
> encouraging worst-case figures when run over a period of over an hour (it
> reports 99.98% worst case at off peak time and 99.77% when run during the
> busy hour). Ultimately when I have physical access to the machine, I will
> change the PCI slots to see if getting "lspci -vb" to report that the card
> is on its own IRQ will improve performance further.
There is a lot of rubbish said about interrupts - if possible use the APIC -
it is the new beast that solves interrupt starvation problems. Seeing if the
card has an IRQ 5 as reported by lspci is misleading - this is the IRQ that
would be used if operating in old mode and in old mode you will have to
disable all kinds of things to make it work. In APIC mode, new hardware comes
into play and each device can have its own interrupt - it is the way to go.
The only problem is that uniprocessor APIC implementations are known to be
badly done - recent motherboards should be OK.
For elucidation see
http://www.microsoft.com/whdc/system/sysperf/IO-APIC.mspx
http://www.microsoft.com/whdc/system/sysperf/apic.mspx
http://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller
http://en.wikipedia.org/wiki/Intel_APIC_Architecture
Paul Hewlett
More information about the asterisk-users
mailing list