Asterisk performance problem on CentOS 7 (Virtual Machine) - UDP Socket buffer gets overflowed

Hello everyone!

I have the following problem with Asterisk on CentOS 7, when I run test with SIPp (UAC scenario), asterisk’s udp socket 5060 gets overflowed. I ran absolutely the same test on virtual machine with Ubuntu 16.04 and didn’t suffer from that kind of issue.

Testing servers info:

I have two virtual servers with CentOS Linux release 7.5.1804 (Core) (172,16,100.102/103), both have Asterisk 16.1.1 and SIPp v3.5.2 installed. Also I have Ubuntu 16.04 ( (Virtual Machine) with Asterisk 14, which I used to compare results.

CentOS7 test results:

SIPp command to run test:

./sipp -s 100 -i -d 100s -l 5000 -mi -r 50

Here is the link to the google disc, there are test results:

CentOS test results

As the result of slow response time and overflowed buffer I get next errors:

chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission 322-6888@ for seqno 1 (Critical Response) -- See

Ubuntu 16.04.4 LTS (Xenial Xerus) test results:

SIPp command to run test:

./sipp -s 100 -i -d 100s -l 5000 -mi -r 50

Ubuntu test results

Possible solutions that I tryed:

  1. I tried to increase socket buffer size, didn’t work out, it also gets full, just a little bit later.
  2. I tried to recompile asterisk with less modules.
  3. Used TCP instead of UDP, situation is much better, but I can’t use TCP in my project.
  4. I turned off a lot of useless plugins.

Little conclusion:

When I do make outgoing calls from asterisk to SIPp (UAS Scenario), I am able to handle ~1500 concurrent calls, but when Asterisk receives calls I start to suffer from buffer overflow. What can cause Asterisk to answer so slowly on CentOS7 ?

The chan_sip module is single threaded for UDP. Depending on what is going on (database access, handling SDP negotiation, everything) it can take time for it to handle/process messages.

So, that doesn’t explain why the buffer gets overflowed on CentOS and does not on Ubuntu. Maybe there are some issues with optimization for CentOS? Systems are crystal clear, nothing else except Asterisk were running during the tests.

Asterisk itself isn’t optimized for any particular distro, it would be something outside of it - or how it is configured/use.

We have similar problem on CentOS 7. Do you have any new information on this issue?