[Home]

Summary:ASTERISK-26730: 13.13.1 with bundled pjproject with optimization used cpu twice more then 13.7.2
Reporter:Dmitriy Serov (Demon)Labels:
Date Opened:2017-01-18 14:24:59.000-0600Date Closed:
Priority:MajorRegression?Yes
Status:Waiting for Feedback/In ProgressComponents:
Versions:13.13.1 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-26599 res_pjsip: High startup time using local configuration files
is related toASTERISK-26806 pjsip_options: rework to make more efficient
Environment:Attachments:( 0) 13.13.1-config_site.h.txt
( 1) 13.13.1-Makefile.rules.txt
( 2) 13.7.2-config_site.h.txt
( 3) 13.7.2-config.log.txt
Description:On same server running 13.13.1 i saw 30-50% CPU utilization. I thought it was unusual.
After some trouble I went back in 13.7.2 with standalone pjproject on the same configs and load. Saw 15-20%. It's usual utilization.

13.13.1 - pjproject 2.5.5 with patches
13.7.2 - pjproject 2.4.5
Comments:By: Asterisk Team (asteriskteam) 2017-01-18 14:24:59.839-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2017-02-13 06:55:27.572-0600

What exactly is the server doing? How many calls are going on? How many endpoints are there? Can you provide configuration and console output?

By: Dmitriy Serov (Demon) 2017-02-14 08:25:28.494-0600

Server has about: 3230 endpoints and 570 registrations. Some little chan_sip, iax2, xmpp/motiff trunks. All of them are in text configs.
A lot of voicemail boxes via realtime.
About 2-6 simultaneous calls.
So there are about 5418 taskprocessors and 90 threads. Is it normal?
CPU load is from SIP packages (REGISTER, OPTIONS, SUBSCRIBE and others). Not from calls!

Now i am using asterisk 13.7 and pjproject 2.4.5 (becouse no one more fresh version runs more than 5-10 mins). Thats why i can't see taskprocessors names :(
This issue i wrote than try asterisk 13.13 with bundled pjproject. And after 4 hours fight with segfaults rollbacked to 13.7, which segfaults more less (every 1-6 hours).
Sorry, I can't add more info for version 13.13 now.


By: Kevin Harwell (kharwell) 2017-02-16 18:00:04.001-0600

what happens if you run the latest version of Asterisk without bundled? Meaning trying running 13.14.0 with pjproject 2.4.5. Does the cpu still go up? That might at least help us narrow down whether the problem is in Asterisk or pjproject.

Or, If it is easier, you could upgrade pjproject to whatever the bundled version was and run Asterisk 13.7 against it to see if the cpu went up or not as well.

By: Kevin Harwell (kharwell) 2017-02-20 13:35:41.980-0600

[~Demon] Trying to narrow this down a bit. You mentioned OPTIONS. As a test what happens if you turn qualifying off by setting _qualify_frequency=0_ Do you still see the high CPU?

By: Dmitriy Serov (Demon) 2017-02-22 04:22:29.757-0600

It is version 13.14 with bundled pjproject installed now.
Before Kevin post, I decided to turn off qualify_frequency for devices. For trunk registrations it is 120 secs (~579 registrations).

Now sngrep shows about 1230 SIP dialogs (not messages) by minute:
a lot of REGISTER, NOTIFY, OPTIONS
a bit of SUBSCRIBE. INVITE

"core show taskprocessors" shows 6671 taskprocessors.
in this list i see a lot of lines old call channels like subp:2067@local-00020c66  or subp:PJSIP/27046-000008ef
why is it there?

What is the way to analize of CPU consumption?

By: Kevin Harwell (kharwell) 2017-02-22 09:45:07.771-0600

{quote}
What is the way to analize of CPU consumption?
{quote}

You can use "top" and give it the pid of your running Asterisk:
{noformat}
$ top -p <pid of Asterisk>
{noformat}

By: Joshua C. Colp (jcolp) 2018-07-13 06:32:34.657-0500

Qualify support has now been rewritten and CPU usage as well as load time has been substantially improved for it. Is this still a problem?