Back to news

*-Users: wcfxs causing constant CPU spikes (Patching LINUX for low latency)

#
Author: Matt Riddell
Daily Asterisk News
Ask Question

Jim Van Meggelen has posted some thoughts on PCs which experience interrupt latency issues:

I have a few things percolating.

First, a little introduction for anyone who isn't sure what's going on:

One of the big challenges that a Digium TDM card has is getting the attention it needs from the processor. These cards do not have a DSP on board, and thus are totally dependant on the CPU to handle this for them. They acheive this by establishing a constant connection to the CPU, a kind of synchronous channel kept alive by their repeated IRQing (this isn't technically correct, but it serves as an analogy). Because of the nature of a media stream (audio, video, whatever), any latency will be experienced by the user as a quality issue, so it is essential that the TDM card always receive priority service from the scheduler.

Here's a fascinating article on managing and adjusting latency. Check out the lspci command. Try setting latency timing between 00 and FF, tell me what (if anything) happens.
l-hw2.html (this article was written by Daniel Robbins, who created Gentoo)

The needs of these cards is very similar in nature to what is required from a Digital Audio Workstation (DAW). DAWs are used as software-based audio editing studios, and if any DSP work needs to be done in the CPU, the same latency problems can exist.

What I did was track down the mailing list that the linux audio developers use (http://www.linuxdj.com/audio/lad/), in the hopes that not only would they have experienced similar performance problems as us, but also have some solutions.

Well, they DO have the same problems that we do, and, more importantly, there have been kernel patches developed (not just one, but at least three different ones) which are specifically intended to address IRQ latency.

Here are some of the resources I used. They discuss problems that are eerily similar to ours:

rh-rtpaper.pdf
#dropouts
ardour.org/requirements.html

Here are the patches:
First, Andrew Morton's:
linux/schedlat.html

Next, Robert Love's patches
preempt-kernel/v2.4/

Finally, Ingo Molnar's controversial, but high-performance patches
lowlatency-patches

And for those who need some tips on kernel rebuilding:
Kernel Build HOWTO

If we can get a few people to test these out, we can determine if the Digium cards and Asterisk would benefit from the same tweaks as the audio engineering folks use.

Thanks.


Comments


Related posts

Back to top

Ready to supercharge your business?

Dialer pricing from only $300 per month!