Hi all, I was using 13.5 but upgraded today to 13.9 (13.10 came out a few hours after I upgraded). On both 13.5 and 13.9 asterisk seems to use 100% of the CPU. This usually happens a few hours after starting asterisk. A restart of asterisk gets the CPU back down, but only for a little while. There asterisk box has no call traffic flowing through it, just 15 or so registrations. I'm sure this is not best practise but for now I am using chan_sip and pjsip at the same time. My pjsip endpoints are using TLS. I am not sure where to start looking in order to debug the CPU usage by asterisk and would very much appreciate some guidance. Kind regards, Chirag -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160722/6471a0c0/attachment.html>
On Thu, Jul 21, 2016 at 6:02 PM, Chirag Desai <djchillerz at gmail.com> wrote:> Hi all, > > I was using 13.5 but upgraded today to 13.9 (13.10 came out a few hours > after I upgraded). > > On both 13.5 and 13.9 asterisk seems to use 100% of the CPU. This usually > happens a few hours after starting asterisk. A restart of asterisk gets the > CPU back down, but only for a little while. > > There asterisk box has no call traffic flowing through it, just 15 or so > registrations. > > I'm sure this is not best practise but for now I am using chan_sip and > pjsip at the same time. My pjsip endpoints are using TLS. > > I am not sure where to start looking in order to debug the CPU usage by > asterisk and would very much appreciate some guidance. >Actually v13.10 has some changes to address high CPU usage in regards to pjsip. Also you should look here for more information: http://blogs.asterisk.org/2016/07/13/asterisk-task-processor-queue-size-warnings/ Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160721/ccdb6596/attachment.html>
On Fri, Jul 22, 2016 at 12:02:43AM +0100, Chirag Desai wrote:> I am not sure where to start looking in order to debug the CPU usage by > asterisk and would very much appreciate some guidance.If you run 'top', the basic information would be to show per-CPU information (press '1'). Another thing to look at: press 'H' to get per-thread entries. Do you have many many threads each taking a small part of a core, or a few threads taking lots of CPU time? I believe that the PID (process/thread ID) you see in top is also the second item in each line in the output of 'core show threads'. So this could give you some clues regarding the CPU hogs you see in top. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
The following bash 1-liner may be useful... while true; do top -Hbc -p `pgrep asterisk` -n 1 && asterisk -rx "core show threads"; sleep 1; done Regards, Ian On 24/07/2016 13:39, Tzafrir Cohen wrote:>> On Fri, Jul 22, 2016 at 12:02:43AM +0100, Chirag Desai wrote:>> >> I am not sure where to start looking in order to debug the CPU usage byasterisk and would very much appreciate some guidance.> > If you run 'top', the basic information would be to show per-CPUinformation (press '1'). Another thing to look at: press 'H' to get per-thread entries. Do you have many many threads each taking a small part of a core, or a few threads taking lots of CPU time? I believe that the PID (process/thread ID) you see in top is also the second item in each line in the output of 'core show threads'. So this could give you some clues regarding the CPU hogs you see in top. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160724/5b654493/attachment.html>