<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Anyone know what the pjsip/distributor tasks are doing?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Customer site had issue this morning and I was able to capture part of the taskprocessors.  This is the first time I have noticed any of our systems or load tests with pjsip/distributor Max Depth reaching double digits.<o:p></o:p></p>
<p class="MsoNormal">Right now, their system has more active channels and active calls in the system than when they experienced problems, but the pjsip/distributors all have a MaxDepth of 2 or 3.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any recommendations or thoughts on what may cause pjsip/distributor tasks to see MaxDepth increase?<o:p></o:p></p>
<p class="MsoNormal">Could this cause jitter and PJSIP packet processing to be slow?  (Other end drops offline because OPTIONS reply not received or maybe not processed in time)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">pjsip/distributor-00000ae9                                                   3010          0         13        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aea                                                   2978          0         30        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aeb                                                   3132          0         11        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aec                                                   2757          0          6        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aed                                                   3336          0         15        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aee                                                   2946          0         14        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aef                                                   2966          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af0                                                   2805          0         18        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af1                                                   3341          0         12        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af2                                                   3282          0          9        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af3                                                   3228          0         11        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af4                                                   2866          0          9        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af5                                                   2902          0         10        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af6                                                   3032          0         24        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af7                                                   2872          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af8                                                   2881          0          9        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000af9                                                   2933          0         12        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000afa                                                   3002          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000afb                                                   2873          0          6        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000afc                                                   3333          0          5        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000afd                                                   2947          0         10        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000afe                                                   3075          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000aff                                                   3204          0         37        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b00                                                   3230          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b01                                                   3041          0          6        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b02                                                   2943          0         10        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b03                                                   3056          0         14        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b04                                                   2756          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b05                                                   2848          0          9        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b06                                                   2965          0         10        450        500<o:p></o:p></p>
<p class="MsoNormal">pjsip/distributor-00000b07                                                   2902          0          8        450        500<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any thoughts?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Dan Cropp <br>
<b>Sent:</b> Tuesday, September 14, 2021 2:00 PM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Subject:</b> RE: [asterisk-users] Large system seeing single CPU core spiking<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you George.  <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That’s good advice on the realtime mode.<o:p></o:p></p>
<p class="MsoNormal">I can have them change this so realtime mode later this week.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Customer’s taskprocessor list is very large.  <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There are a large number of entries from core show taskprocessors data<o:p></o:p></p>
<p class="MsoNormal">The are one a few that are showing the Max Depth of 10 or more.  Only including those and the stasis/pool<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Processor                                                               Processed   In Queue  Max Depth  Low water High water<o:p></o:p></p>
<p class="MsoNormal">pjsip/pool-control                                                         501599          0         89        450        500<o:p></o:p></p>
<p class="MsoNormal">stasis/m:cache_pattern:0/endpoint:all-000015f0                             383224          0         21        450        500<o:p></o:p></p>
<p class="MsoNormal">stasis/m:devicestate:all-00000002                                          233836          0         28        450        500<o:p></o:p></p>
<p class="MsoNormal">stasis/m:manager:core-00000006                                            4649316          0         69       2700       3000<o:p></o:p></p>
<p class="MsoNormal">stasis/pool                                                                 11670          0          2        450        500<o:p></o:p></p>
<p class="MsoNormal">stasis/pool-control                                                         23505          0         75        450        500<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">5922 taskprocessors<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We do use AMI for a significant amount of communication (action/events).<o:p></o:p></p>
<p class="MsoNormal">Might this be a singleton that could explain the high use for a single asterisk process id?<o:p></o:p></p>
<p class="MsoNormal">NOTE: working on migrating to ARI which I know will help in the call control.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> asterisk-users <<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>>
<b>On Behalf Of </b>George Joseph<br>
<b>Sent:</b> Tuesday, September 14, 2021 12:56 PM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>><br>
<b>Subject:</b> Re: [asterisk-users] Large system seeing single CPU core spiking<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Sep 14, 2021 at 9:19 AM Dan Cropp <<a href="mailto:dan@amtelco.com">dan@amtelco.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thank you George.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">It is using local file based configuration files.<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Well, that's good at least.  It eliminates the database layer which can be troublesome in virtualized environments, especially if a SAN and/or a remote database server is used.<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Other factors.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">We run Asterisk in realtime mode to allow it to run as fast as possible.<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Running at "realtime" level is usually NOT a good thing for Asterisk and rarely needed when there are adequate resources.  Let's say you have a local DNS resolver running.   If the system is stressed, Asterisk could actually starve the
 resolver of resources, which then causes Asterisk to back up waiting for DNS resolution to complete.  We've seen this happen when using a database backend for configuration.  Someone thinks "I'll just give Asterisk more resources" forgetting that Asterisk
 needs the database engine to run.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I just learned customer upgraded to 24 CPU cores.  Although, I’m not sure they actually assigned 24 physical cores to this machine or just increasing Hyper-V values.<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">How is this VM's priority versus other VMs on the same cluster?  Just because it has 24 threads doesn't mean it's got 24 threads dedicated.  Does using a realtime priority in the VM trickle down to Hyper-V's hypervisor's resource management
 algorithms?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I will monitor for additional information and see if the customer will allow me to capture a coredump when problems are happening.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Waiting for them to report an incident.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Here is a small sample of the system right now (24 cores), to the best of my knowledge it’s running fine.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">top -p 1509 -n 1 -H -b<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">top - 15:06:32 up  9:06,  2 users,  load average: 6.02, 5.59, 5.26<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Threads: 1709 total,   8 running, 1701 sleeping,   0 stopped,   0 zombie<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">%Cpu(s):  3.1 us,  2.5 sy,  0.0 ni, 94.3 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">KiB Mem : 32143072 total, 29750072 free,  1016132 used,  1376868 buff/cache<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">KiB Swap:  8388604 total,  8388604 free,        0 used. 30697060 avail Mem<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">   PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">  1830 root     -11   0 13.741g 493680  28828 R 99.9  1.5 174:13.39 asterisk<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">  1541 root     -11   0 13.741g 493680  28828 R 14.3  1.5  20:03.30 asterisk<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">33601 root     -11   0 13.741g 493680  28828 S  9.5  1.5   0:16.30 asterisk<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">46605 root     -11   0 13.741g 493680  28828 S  9.5  1.5   0:30.06 asterisk<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">  2295 root     -11   0 13.741g 493680  28828 S  4.8  1.5  12:25.50 asterisk<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">  2297 root     -11   0 13.741g 493680  28828 S  4.8  1.5   1:10.59 asterisk<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There's definitely one thread that's pegging a CPU.  If that thread is one of the few "singleton" threads, that can be an issue.  What does "core show taskprocessors" indicate?  Are there any that are hitting their limits?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b>From:</b> asterisk-users <<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>>
<b>On Behalf Of </b>George Joseph<br>
<b>Sent:</b> Tuesday, September 14, 2021 9:39 AM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>><br>
<b>Subject:</b> Re: [asterisk-users] Large system seeing single CPU core spiking<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Tue, Sep 14, 2021 at 8:07 AM Dan Cropp <<a href="mailto:dan@amtelco.com" target="_blank">dan@amtelco.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am working with a very large customer running Asterisk with PJSIP.  Systems total channels have been over 2500 (which includes hundreds of local channels and ConfBridges) when
 the issues occur.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">It’s running on a Hyper-V VM with 12 CPU cores.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Things work fine most of the time.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">They periodically see 10-30 minute periods where audio starts sounding like jitter buffer type issues.  Can literally have someone spelling their name and a ConfBridge recording
 of it shows the audio is missing a letter or two.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The odd part is another system (not running Asterisk) was handling these calls previously.  The overall network has plenty of bandwidth (as evidenced by another system able to handle
 the call volume)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">One area that has perplexed us is when using htop, we see a single CPU core will spike to 100%.  Which core does keep changing.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Asterisk is definitely the process using the vast majority of the CPU cycles.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">We recently found a setting on Hyper-V networking SR-IOV which improved things.  Prior to changing this setting, we were seeing SIP OPTIONS packets/responses would occasionally
 take more than 3 seconds causing devices to drop and come back online.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">We have configured a similar system running at Amazon handling far more traffic and can’t get the single CPU core to spike.  Only small static pops during the calls.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The sheer scale of the system is making it hard to diagnose the problem.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any thoughts on how to diagnose what is causing the single CPU core to spike?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any thoughts on how to diagnose the problem?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any other thoughts/comments?<o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The first thing I'd do is see where the CPU is spending time: userspace, system, nice, wait, etc.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is it actually the asterisk process consuming the CPU?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is Asterisk running with local file-based configs, local database, remote database, etc?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If call quality is really bad already and your customer agrees, you could try the following the next time it happens...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 1. Run "top -p `pidof asterisk` -n 1 -H -b" to get a list of all of Asterisk's threads and their CPU utilization.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 2. Run ast_coredumper with the --RUNNING option.  This will pause Asterisk while the dump is being generated!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 3. See if you can correlate the high cpu thread IDs from the top output to the threads listed in the coredumper's -brief.txt file.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">That _may_ give you an idea of where to look.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dan<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt"><br>
This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you are not the intended recipient you are hereby notified that any dissemination, copying or
 distribution of this email or its contents is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.
</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">--
<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">
http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" target="_blank">
https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank">
https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt"><br>
This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you are not the intended recipient you are hereby notified that any dissemination, copying or
 distribution of this email or its contents is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.
</span><o:p></o:p></p>
</div>
<p class="MsoNormal">-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">
http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" target="_blank">
https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank">
https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<span style="font-size:10.0pt"><br>
This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law. If you are not the intended recipient you are hereby notified that any dissemination, copying or
 distribution of this email or its contents is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.
</span>
</body>
</html>