<div dir="ltr">Hi Ken,<div><br></div><div>I'm using .wav, this is my ESL command:</div><div>
<p class="gmail-p1"><span class="gmail-s1">originate {sip_h_X-UUID=9d33a760-gmwz-qn1n-xvqz-qal4-9d33b25a89,sip_h_X-Campaign=3A252BEX9W,ignore_early_media=false,bridge_early_media=false,originate_timeout=70,bridge_answer_timeout=70,call_timeout=70,[leg_timeout=70],execute_on_answer_1='sched_hangup 18 ALLOTTED_TIMEOUT',origination_uuid=9d33a760-gmwz-qn1n-xvqz-qal4-9d33b25a89,origination_caller_id_number=+14081116805,RECORD_STEREO=true,execute_on_answer_2='record_session /var/www/html/recordings/9d33a760-gmwz-qn1n-xvqz-qal4-9d33b25a89.wav'}sofia/gateway/kamailio/+14080001963 handle_calls</span></p><p class="gmail-p1"><span class="gmail-s1">I created a separate volume for writing only recording files & logs.</span></p><p class="gmail-p1"><span class="gmail-s1">I will consider increasing CPUs, do you think I still can remove some of the modules I currently using to improve performance?</span></p><p class="gmail-p1"><span class="gmail-s1">Thanks!</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 2, 2016 at 9:07 PM, Ken Rice <span dir="ltr"><<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_2421303879277091155WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">How are you actually recording the files? Native? mp3? wav? Something else?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">keep in mind that recording also means disk io which means more CPU while its recording to handle the IO load… there are way too many undisclosed factors here that can and will impact your performance…<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">one example is 2 cores? That’s all? FS is a highly threaded application… that means for each call leg there is atleast 1 thread… so the more cores the merrier… <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">not to mention you are running on amazon that leaves a whole different set of variables to attend too….<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-<wbr>bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Gonzalo Gasca Meza<br><b>Sent:</b> Sunday, October 2, 2016 10:43 PM<br><b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>><br><b>Subject:</b> [Freeswitch-users] Performance testing<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi all,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I'm testing Freeswitch using ESL interface, recording and SIP UDP Calls at a rate of around 5 CPS.<u></u><u></u></p></div><div><p class="MsoNormal">Freeswitch receives ESL requests and proceeds to send call to PSTN Emulator, once call is answered I start recording. I have noticed around 40% CPU utilization when recording is not enabled and ~60%+ CPU when recording is.<u></u><u></u></p></div><div><p class="MsoNormal">I created/mount a volume specifically to store the recording files. (ext4)<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><b>Server specifications:</b><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">EC2 server (<span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;background:#eaf3fe">t2.medium) </span><span style="font-size:10.5pt;font-family:"Helvetica Neue",serif;color:#444444">2 vCPUs, 2.5 GHz, Intel Xeon Family, 4 GiB memory.</span><u></u><u></u></p></div><div><p class="MsoNormal">FreeSWITCH (Version 1.6.9 -16-d574870 64bit)<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="m_2421303879277091155gmail-p1">I followed instructions at: <a href="https://wiki.freeswitch.org/wiki/Performance_testing_and_configurations" target="_blank">https://wiki.freeswitch.<wbr>org/wiki/Performance_testing_<wbr>and_configurations</a><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><b>[Questions]</b> <u></u><u></u></p><p class="m_2421303879277091155gmail-p1">a) How to strip down Freeswitch and remove non-used modules? <u></u><u></u></p><p class="m_2421303879277091155gmail-p1">Features I need:<u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><b>esl, recording, loopback, bridge, sip, spandsp, cdr_csv.</b><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">My modules: </span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1"><b>fs_cli -x "show modules"</b></span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><a href="http://pastebin.com/BQSxzFDE" target="_blank">http://pastebin.com/BQSxzFDE</a><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">b) I would like to see which module is using X/Y amount of CPU cycles/memory in Freeswitch is it possible?.</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><u></u> <u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1"><b>fs_cli -x 'show status'</b></span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">UP 0 years, 0 days, 1 hour, 2 minutes, 15 seconds, 541 milliseconds, 286 microseconds</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">FreeSWITCH (Version 1.6.9 -16-d574870 64bit) is ready</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">18192 session(s) since startup</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">90 session(s) - peak 93, last 5min 92 </span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">5 session(s) per Sec out of max 30, peak 7, last 5min 6 </span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">1000 session(s) max</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">min idle cpu 0.00/75.57</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">Current Stack Size/Max 240K/8192K</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><u></u> <u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">A sample image is below: 40% steady (no recording) a peak when I enabled recording.</span><u></u><u></u></p><p class="MsoNormal"><img border="0" width="528" height="265" style="width:5.5in;height:2.7604in" id="m_2421303879277091155_x0000_i1025" src="cid:image001.png@01D21D01.C3E3E170" alt="Inline image 1"><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1"># top</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">top - 03:25:16 up 22:42, 1 user, load average: 3.88, 5.74, 10.39</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">Tasks:</span><span class="m_2421303879277091155gmail-s2"><b> 68 </b></span><span class="m_2421303879277091155gmail-s1">total,</span><span class="m_2421303879277091155gmail-s2"><b> 1 </b></span><span class="m_2421303879277091155gmail-s1">running,</span><span class="m_2421303879277091155gmail-s2"><b> 67 </b></span><span class="m_2421303879277091155gmail-s1">sleeping,</span><span class="m_2421303879277091155gmail-s2"><b> 0 </b></span><span class="m_2421303879277091155gmail-s1">stopped,</span><span class="m_2421303879277091155gmail-s2"><b> 0 </b></span><span class="m_2421303879277091155gmail-s1">zombie</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p3"><span class="m_2421303879277091155gmail-s3">%Cpu(s):</span><span class="m_2421303879277091155gmail-s1"><b> 11.0 </b></span><span class="m_2421303879277091155gmail-s3">us,</span><span class="m_2421303879277091155gmail-s1"><b> 2.3 </b></span><span class="m_2421303879277091155gmail-s3">sy,</span><span class="m_2421303879277091155gmail-s1"><b> 0.0 </b></span><span class="m_2421303879277091155gmail-s3">ni,</span><span class="m_2421303879277091155gmail-s1"><b> 85.7 </b></span><span class="m_2421303879277091155gmail-s3">id,</span><span class="m_2421303879277091155gmail-s1"><b> 0.0 </b></span><span class="m_2421303879277091155gmail-s3">wa,</span><span class="m_2421303879277091155gmail-s1"><b> 0.0 </b></span><span class="m_2421303879277091155gmail-s3">hi,</span><span class="m_2421303879277091155gmail-s1"><b> 0.7 </b></span><span class="m_2421303879277091155gmail-s3">si,</span><span class="m_2421303879277091155gmail-s1"><b> 0.4 </b></span><span class="m_2421303879277091155gmail-s3">st</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p3"><span class="m_2421303879277091155gmail-s3">KiB Mem: </span><span class="m_2421303879277091155gmail-s1"><b> 4057584 </b></span><span class="m_2421303879277091155gmail-s3">total,</span><span class="m_2421303879277091155gmail-s1"><b> 865964 </b></span><span class="m_2421303879277091155gmail-s3">used,</span><span class="m_2421303879277091155gmail-s1"><b> 3191620 </b></span><span class="m_2421303879277091155gmail-s3">free,</span><span class="m_2421303879277091155gmail-s1"><b> 147088 </b></span><span class="m_2421303879277091155gmail-s3">buffers</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p3"><span class="m_2421303879277091155gmail-s3">KiB Swap:</span><span class="m_2421303879277091155gmail-s1"><b> 1048572 </b></span><span class="m_2421303879277091155gmail-s3">total,</span><span class="m_2421303879277091155gmail-s1"><b> 0 </b></span><span class="m_2421303879277091155gmail-s3">used,</span><span class="m_2421303879277091155gmail-s1"><b> 1048572 </b></span><span class="m_2421303879277091155gmail-s3">free.</span><span class="m_2421303879277091155gmail-s1"><b> 213572 </b></span><span class="m_2421303879277091155gmail-s3">cached Mem</span><u></u><u></u></p><p class="m_2421303879277091155gmail-p2"><u></u> <u></u></p><p class="m_2421303879277091155gmail-p4"><span class="m_2421303879277091155gmail-s1"> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND </span><u></u><u></u></p><p class="m_2421303879277091155gmail-p1"><span class="m_2421303879277091155gmail-s1">26217 freeswi+ -2 -10 1427444 302584 16904 S <b>65.9</b> 7.5 28:47.49 freeswitch </span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>