High CPU spikes with PJSIP and Asterisk 13.15

Qualify support was rewritten and should be better in the next set of releases.

Thks for your answer.

How many endpoints ?

It was tested against 3000 and CPU usage was minimal.

What processor and memory in this server ?

It was my dev instance, so 4GB of RAM and an Intel i7-4790.

Ok tks for share information

Hello Jcolp,

Is there information what versions that would be and how soon?

Thank you.

It has been merged in and will be available in the next release, probably 2-4 weeks.

Great news! Thanks for sharing.

We are using the Freepbx Distro 7 using asterisk 13.19.1

Some of the times when we get high CPU spikes are:

  1. We perform a reload. The new dial plan is fed into asterisk and it processes it. Then the Freepbx portion is done and the cpu stabilizes for a few seconds. After that asterisk seems to rebuild the subscriptions/BLF’s and that causes the CPU to spike like crazy and stay crazy. Optimizing or splitting subscription processing to another core would really help to stabilize our asterisk. That main asterisk thread gets up to 200%+ usage during reloads now.
    a) Our system has a little under 1000 active extensions on one of our servers. Many of our phones are Yealinks and some of them are Yealink T29’s with 27 BLF keys and all 27 keys are filled with other BLF’s. So 20 phones with 27 subscriptions each. We have probably over 300 phones with 20 or more BLF keys each. Subscription processing gets massive so reloads are a major problem. During a reload BLF lights on yealinks will shut off for a few seconds on both Chan_SIP and PJSIP.
  2. With 1000 active extensions we have a massive CDR/CEL table, so perhaps it is causing part of this. When we have 30+ active calls being made, ended, transfered, etc I notice that CPU use jumps quite a bit with even 2-3 new calls. If 10 calls come in at once it can jump the asterisk thread from 50% to 100% use. It seems like new calls cause significant jumps in usage. However this might be a mix between asterisk and Freepbx. Thought I should at least let the asterisk devs know since this affects a system that depends on asterisk.
1 Like

Your Yealink phones support Resource List Subscriptions, you could define some or all of your BLF groups as RLS entries and save on updates that way.

That’s assuming FreePBX supports doing stuff with RLS and you are using chan_pjsip.

This is the first time I have heard of Resource List Subscriptions and I am using PJSIP on certain extensions, planning to convert all. Not sure if its on Freepbx yet.

Link I found to more info: https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=30278158

Hello @jcolp,

we have been running into the exactly same issues like @devox, since we migrated a bunch of devices to pjsip, Asterisk 13.13-cert6, FreePBX 14.0.13.40.
You mentioned that Qualify support was rewritten. In which version have the fixes been applied?

Such changes are not present in 13.13-cert6. Versions the change went in are listed on the JIRA issue[1].

[1] https://issues.asterisk.org/jira/browse/ASTERISK-26806