Interpreting and using the Asterisk “timing test” command

asterisk

Timing is very important for certain kinds of applications in Asterisk. If DAHDI is the timing source, the dahdi_test command can be used to check the timing provided by the DAHDI kernel module. If dahdi_test returns exclusively measurements above 99.975%, the DAHDI timing source is generally considered good.

Since Asterisk 1.6, new timing sources have become available, such as pthread and timerfd, which are useful in systems that do not or cannot use DAHDI hardware for timing, as they represent an improvement over the dahdi_dummy module. Obviously, if DAHDI timing is not being used, dahdi_test will not be useful to test the timing source; but the accuracy of any timing source seems to be measurable with the Asterisk CLI timing test command:

localhost*CLI> timing test
Attempting to test a timer with 50 ticks per second.
Using the 'timerfd' timing module for this test.
It has been 1000 milliseconds, and we got 50 timer ticks

My concern is that timing 50 ticks seems to be a considerably less stressful test than dahdi_test's 8192 samples in 8000 ms, particularly since just about every system I've tried it on, virtual or otherwise, can handle it.

I can ask timing test to ramp it up to what I think are dahdi_test's standards:

localhost*CLI> timing test 1024
Attempting to test a timer with 1024 ticks per second.
Using the 'timerfd' timing module for this test.
It has been 1000 milliseconds, and we got 1024 timer ticks

This will indeed break down a bit depending on the system I'm using, usually with a decrease in timer ticks. But I'm not sure whether this is useful to stress it to this level.

Is there authoritative guidance on using and interpreting the timing test command to insure that a given Asterisk system has a timing source that will work well?

Best Answer

I realize this is an old question, but for anyone else who comes along from google: it is my understanding that if your motherboard has a high-frequency timing source built-in (many do), and as long as it's enabled in the BIOS settings, the Linux kernel will know about it, and timerfd should perform just as well as anything else.

I have excellent performance with timerfd using Asterisk on CentOS 6.5, inside VMware ESXi 5.5, hardware version 10 (with latency sensitivity set to High in the virtual machine configuration), and vmware-tools-esx-nox RPMs installed. So, that's without a "real", physical HF timing source. Asterisk used to be terrible on older versions of vmware, but virtualization in general has come a long way.

Related Topic