The numbers your posting are fairly low, I&#39;m guessing this is a grossly underpowered vm that is causing your issues<span></span><br><br>On Friday, August 28, 2015, Shaun Stokes &lt;<a href="mailto:shaun.stokes@itec-support.co.uk">shaun.stokes@itec-support.co.uk</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Hi Peter,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Thanks for the advice, this is something we’re already looking into but we don’t have the new hardware available yet.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Debian 8 has great integration with Hyper-V on 2012R2 and operates as a Generation 2 VM, obviously it’s never going to be as good as
 running directly on the hardware but we were hoping for better performance.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Shaun<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;freeswitch-users-bounces@lists.freeswitch.org&#39;);" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;freeswitch-users-bounces@lists.freeswitch.org&#39;);" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Peter Olsson<br>
<b>Sent:</b> 28 August 2015 10:43<br>
<b>To:</b> FreeSWITCH Users Help &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;freeswitch-users@lists.freeswitch.org&#39;);" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
<b>Subject:</b> Re: [Freeswitch-users] FreeSwitch - Performance issues<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">If you want high performance, I recommend using real hardware, not a virtual machine setup - it will cause you issues.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">/Peter<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2015-08-28 9:44 GMT+02:00 Shaun Stokes &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;shaun.stokes@itec-support.co.uk&#39;);" target="_blank">shaun.stokes@itec-support.co.uk</a>&gt;:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Hi Michael,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Thanks for the response and recommendation.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Our new build is now on Debian 8 Jessie, performance on the system is noticeably better and any audio
 problems while the system is under load are significantly reduced but we do still experience spikes along with reduced audio quality when the system is processing 20 calls per second while already maintaining 80 existing calls.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">We’re still hitting some kind of bottleneck, what should we expect to be able to support on a single
 piece of hardware? We’ve kept our dialplans as small as possible and we’re using Memcache, but something tells me it’s the call setup process which is triggering the spikes, is this possibly a limitation on the SIP profiles which are single threaded?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">I also see FreeSWITCH supports clustering but it’s in relation to high availability, is it possible
 to cluster a single FreeSWITCH instance across multiple hardware or should we be looking elsewhere to solve these bottlenecks?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">We switched to TCP Vegas on our new build as recommended on the FreeSWITCH Wiki, this has provided
 a noticeable reduction in audio latency but doesn’t solve the issue with CPU spikes.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Many Thanks,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Shaun</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;freeswitch-users-bounces@lists.freeswitch.org&#39;);" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;freeswitch-users-bounces@lists.freeswitch.org&#39;);" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Michael Jerris<br>
<b>Sent:</b> 15 August 2015 23:00<br>
<b>To:</b> FreeSWITCH Users Help &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;freeswitch-users@lists.freeswitch.org&#39;);" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
<b>Subject:</b> Re: [Freeswitch-users] FreeSwitch - Performance issues</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">There are multiple known issues with Ubuntu 12.04.  We reccomend Debian 8 Jessie.<br>
<br>
On Friday, August 14, 2015, Shaun Stokes &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;shaun.stokes@itec-support.co.uk&#39;);" target="_blank">shaun.stokes@itec-support.co.uk</a>&gt; wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">We’re experiencing performance issues with FreeSwitch, our target is 500 concurrent sessions, but at the moment this starts to bottleneck around 30.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Host system:<u></u><u></u></p>
<p class="MsoNormal">Windows Server 2012 Hyper-V Host<u></u><u></u></p>
<p class="MsoNormal">AMD Opteron 4386 (2 processors) – 16 cores total<u></u><u></u></p>
<p class="MsoNormal">128GB DDR3<u></u><u></u></p>
<p class="MsoNormal">2TB RAID 5 (700MB/s tested read and write throughput)<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">FreeSwitch Virtual Machine:<u></u><u></u></p>
<p class="MsoNormal">FreeSwitch 1.4.15<u></u><u></u></p>
<p class="MsoNormal">Ubuntu 12.04 LTS<u></u><u></u></p>
<p class="MsoNormal">16 Virtual cores (high priority)<u></u><u></u></p>
<p class="MsoNormal">2GB RAM (would assign more but FreeSwitch never seems to use much)<u></u><u></u></p>
<p class="MsoNormal">500GB HD (on VHDX)<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">After around 30 concurrent sessions we begin to see CPU spikes almost every time a new call comes in, as the sessions increase the size and frequency of the CPU spikes also increase.
 The system seems to be able to sit comfortably with over 100 concurrent sessions and 80% idle CPU, providing we don’t have any new calls hitting the platform. The spikes are causing audio (RTP) to stutter or in some cases drop completely for a few seconds.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">The FreeSwitch spikes are occurring on all 16 cores, we have been monitoring the system using htop and mpstat.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">This is an example of when we receive an inbound call while we have 34 concurrent sessions:<u></u><u></u></p>
<p class="MsoNormal">14:26:04     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle<u></u><u></u></p>
<p class="MsoNormal">14:26:05     all    1.67    0.00   27.34    0.00    0.25    0.00    0.00    0.00   70.74<u></u><u></u></p>
<p class="MsoNormal">14:26:05       0    1.00    0.00   28.00    0.00    0.00    0.00    0.00    0.00   71.00<u></u><u></u></p>
<p class="MsoNormal">14:26:05       1    0.99    0.00   26.73    0.00    0.00    0.00    0.00    0.00   72.28<u></u><u></u></p>
<p class="MsoNormal">14:26:05       2    0.99    0.00   26.73    0.00    0.00    0.00    0.00    0.00   72.28<u></u><u></u></p>
<p class="MsoNormal">14:26:05       3    3.92    0.00   26.47    0.00    0.00    0.00    0.00    0.00   69.61<u></u><u></u></p>
<p class="MsoNormal">14:26:05       4    0.99    0.00   25.74    0.00    1.98    0.00    0.00    0.00   71.29<u></u><u></u></p>
<p class="MsoNormal">14:26:05       5    0.99    0.00   26.73    0.00    0.99    0.00    0.00    0.00   71.29<u></u><u></u></p>
<p class="MsoNormal">14:26:05       6    0.00    0.00   26.47    0.00    0.98    0.00    0.00    0.00   72.55<u></u><u></u></p>
<p class="MsoNormal">14:26:05       7    0.00    0.00   26.73    0.00    0.00    0.00    0.00    0.00   73.27<u></u><u></u></p>
<p class="MsoNormal">14:26:05       8    3.96    0.00   27.72    0.00    0.00    0.00    0.00    0.00   68.32<u></u><u></u></p>
<p class="MsoNormal">14:26:05       9    2.00    0.00   27.00    0.00    0.00    0.00    0.00    0.00   71.00<u></u><u></u></p>
<p class="MsoNormal">14:26:05      10    6.00    0.00   32.00    0.00    0.00    0.00    0.00    0.00   62.00<u></u><u></u></p>
<p class="MsoNormal">14:26:05      11    1.96    0.00   27.45    0.00    0.00    0.00    0.00    0.00   70.59<u></u><u></u></p>
<p class="MsoNormal">14:26:05      12    0.99    0.00   26.73    0.00    0.00    0.00    0.00    0.00   72.28<u></u><u></u></p>
<p class="MsoNormal">14:26:05      13    1.00    0.00   28.00    0.00    0.00    0.00    0.00    0.00   71.00<u></u><u></u></p>
<p class="MsoNormal">14:26:05      14    0.00    0.00   27.00    0.00    0.00    0.00    0.00    0.00   73.00<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">This is when the system is not receiving an inbound call but is sitting comfortably at 34 concurrent sessions:<u></u><u></u></p>
<p class="MsoNormal">14:25:57     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle<u></u><u></u></p>
<p class="MsoNormal">14:25:58     all    0.87    0.00    0.62    0.00    0.12    0.00    0.00    0.00   98.39<u></u><u></u></p>
<p class="MsoNormal">14:25:58       0    0.99    0.00    0.99    0.00    0.00    0.00    0.00    0.00   98.02<u></u><u></u></p>
<p class="MsoNormal">14:25:58       1    0.99    0.00    0.99    0.00    0.00    0.00    0.00    0.00   98.02<u></u><u></u></p>
<p class="MsoNormal">14:25:58       2    0.98    0.00    0.98    0.00    0.00    0.00    0.00    0.00   98.04<u></u><u></u></p>
<p class="MsoNormal">14:25:58       3    0.00    0.00    0.99    0.00    0.00    0.00    0.00    0.00   99.01<u></u><u></u></p>
<p class="MsoNormal">14:25:58       4    0.00    0.00    0.00    0.00    1.98    0.00    0.00    0.00   98.02<u></u><u></u></p>
<p class="MsoNormal">14:25:58       5    0.00    0.00    0.00    0.00    0.99    0.00    0.00    0.00   99.01<u></u><u></u></p>
<p class="MsoNormal">14:25:58       6    0.00    0.00    0.99    0.00    0.00    0.00    0.00    0.00   99.01<u></u><u></u></p>
<p class="MsoNormal">14:25:58       7    0.00    0.00    0.99    0.00    0.00    0.00    0.00    0.00   99.01<u></u><u></u></p>
<p class="MsoNormal">14:25:58       8    5.00    0.00    1.00    0.00    0.00    0.00    0.00    0.00   94.00<u></u><u></u></p>
<p class="MsoNormal">14:25:58       9    1.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   99.00<u></u><u></u></p>
<p class="MsoNormal">14:25:58      10    1.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   99.00<u></u><u></u></p>
<p class="MsoNormal">14:25:58      11    0.99    0.00    0.99    0.00    0.00    0.00    0.00    0.00   98.02<u></u><u></u></p>
<p class="MsoNormal">14:25:58      12    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00<u></u><u></u></p>
<p class="MsoNormal">14:25:58      13    1.98    0.00    0.99    0.00    0.00    0.00    0.00    0.00   97.03<u></u><u></u></p>
<p class="MsoNormal">14:25:58      14    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00<u></u><u></u></p>
<p class="MsoNormal">14:25:58      15    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">We’re using FreeSwitch in multi-tenant mode, we have tried dedicating a single VM for one tenancy but still experience the issue. My assumption has been that this will be due to
 the dialplan, I’ve optimized this slightly by writing LUA scripts to handle some of the inbound calls this appears to take away some of the load but we’re still using the internal dialplans for each tenancy (tenancy dialplans have an average of 300 entries).<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">We are using the following arguments when running FreeSwitch:<u></u><u></u></p>
<p class="MsoNormal">-rp –nc –nonat<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I’ve seen another post which says we should operate FreeSwitch in High Performance mode using –hp but can’t find anything information about this, is this still a valid argument
 to use with FreeSwitch?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Has anyone experienced similar performance issues before or have any advice?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Hope someone may be able help.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Shaun<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
______________________________________________________________________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________________________________________________<u></u><u></u></p>
</div>
</blockquote>
<p class="MsoNormal"><br>
______________________________________________________________________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________________________________________________<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
______________________________________________________________________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________________________________________________<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;consulting@freeswitch.org&#39;);" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;FreeSWITCH-users@lists.freeswitch.org&#39;);" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><br>
______________________________________________________________________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________________________________________________<u></u><u></u></p>
</div>
<br clear="both">
______________________________________________________________________<br>
This message has been checked for all known viruses by  MessageLabs Virus Scanning Service.<br>
______________________________________________________________________<br>
</div>


</blockquote>