[Asterisk-Dev] High resolution timers using POSIX clocks instead of zaptel

Luigi Rizzo rizzo at icir.org
Tue Jun 7 10:24:04 MST 2005


On Tue, Jun 07, 2005 at 12:55:17PM -0400, Steve Kann wrote:
...
> >>>Fact of life - on a 2.4 Linux kernel for x86 or PPC the timer
> >>>resolution is 10ms (look for the HZ macro in
> >>>/usr/src/linux/include/asm/param.h) That's simply not enough.
...

that can be changed easily through a kernel config parameter
or kernel rebuild on most platforms. I have run FreeBSD with 1khz
interrupts since 1996, and lots of people use higher rates these days.

But the problem perhaps is different, namely if you rely on the
scheduler to do preemption, and you are unlucky (namely some other
process is in a busy waiting loop), the quantum could be much larger
(100ms is typical) and you might be delayed by 1 quantum times the
number of busy processes in the system.  That is soft configurable,
too, so you should have some form of control on this.

In any case the problem is not the interrupt rate, the problem is the
misconfiguration of other parameters (scheduler quantum)
or the amount of buggy processes (spinning on unhandled
error conditions on system calls, or doing busy-waiting to
acquire a lock are typical cases) that you have on your system.

No hardware interrupt source will save you from that.

	cheers
	luigi



More information about the asterisk-dev mailing list