Network Connectivity - How do I determine the latency of my Asterisk server?

Network Connectivity - How do I determine the latency of my Asterisk server?

Table of Contents

Problem Description

Suspected latency issues on your server, including:

  • audio quality issues (noise, distortion, etc.)

  • low dahdi_test scores (less than 99.80 percent)

Answer

The cyclictest is continuous test that measures the time that your processor (CPU) takes to run an specific command. The goal of this test is to confirm if the processor will respond timely over the time. It's important to mention that this test requires an extended period of time to run.

Steps

  1. Check the latest version of the Cyclictest at http://mirror.linux.org.au/linux/kernel/people/tglx/rt-tests/

  1. Download and compile the application: 

              # wget http://www.kernel.org/pub/linux//kernel/people/clrkwllms/rt-tests/rt-tests-X.XX.tar.gz
              # tar -zxvf rt-tests-X.XX.tar.gz
              # cd rt-tests
              # make

  1.  Run the application  using:  chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000

# chrt -f 99 ./cyclictest -t1 -p 80 -i 10000 -n -l 100000
WARNING: High resolution timers not available         
policy: fifo: loadavg: 1.15 1.23 1.27 2/294 28467         

T: 0 (28447) P:80 I:10000 C:    847 Min:      3 Act:    7 Avg:  273 Max:   16112
(The "max" shows the highest latency detected during the execution of  test) 

Latency Table

~0          to        3000          Exceptional
3001       to        5000          Excellent
5001       to        8000          Good
8001       to      12000          Acceptable
12001     to      25000         Poor  
25000     to      ∞                 Very poor (Dahdi will disable the Sangoma Card)