[asterisk-users] Timer_fd, pthreads, or DAHDI timer for timing under

Joshua Colp jcolp at digium.com
Fri Feb 20 07:32:27 CST 2015

Stefan Viljoen wrote:
> Hi guys
> I have some questions regarding the above
> 1. Why are there different options for timing?

Some systems don't have timerfd, some systems don't have DAHDI. The goal 
is to have at least some sort of timing module for every system.

> 2. What are the differences between these types of timing sources?

Timerfd uses an interface provided by the kernel for reliable timing. 
DAHDI uses the timing provided by a physical card. pthread emulates a 
timing source by using some wait logic. kqueue is for OSX systems.

> 3. When should you use what?

timerfd > DAHDI > pthread.

> 4. Is one timer type more "reliable" for an Asterisk system under heavy
> loads than another while NOT using any DAHDI hardware - SIP only?

timerfd will always be more reliable than pthread.

> I'm of course referring to the familiar "spamming timer_fd error messages in
> the CLI with increasing load until asterisk crashes" phenomenon.

A change was done over 2 years ago[1] to stop this spamming from 
occurring. An issue[2] remains open, though, as the underlying reason 
for the failure was not isolated.

[1] http://svnview.digium.com/svn/asterisk/branches/?view=log&pathrev=375893
[2] https://issues.asterisk.org/jira/browse/ASTERISK-20032

Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

More information about the asterisk-users mailing list