<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
        {font-family:"Helvetica Neue";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.gmail-p1, li.gmail-p1, div.gmail-p1
        {mso-style-name:gmail-p1;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.gmail-s1
        {mso-style-name:gmail-s1;}
span.gmail-s2
        {mso-style-name:gmail-s2;}
p.gmail-p3, li.gmail-p3, div.gmail-p3
        {mso-style-name:gmail-p3;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.gmail-s3
        {mso-style-name:gmail-s3;}
p.gmail-p2, li.gmail-p2, div.gmail-p2
        {mso-style-name:gmail-p2;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.gmail-p4, li.gmail-p4, div.gmail-p4
        {mso-style-name:gmail-p4;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle26
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1257249089;
        mso-list-type:hybrid;
        mso-list-template-ids:-2052666292 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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><div class=WordSection1><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?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></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…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></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… <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></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….<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></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'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <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 &lt;freeswitch-users@lists.freeswitch.org&gt;<br><b>Subject:</b> [Freeswitch-users] Performance testing<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Hi all,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></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.<o:p></o:p></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.<o:p></o:p></p></div><div><p class=MsoNormal>I created/mount a volume specifically to store the recording files. (ext4)<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><b>Server specifications:</b><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></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)&nbsp;</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><o:p></o:p></p></div><div><p class=MsoNormal>FreeSWITCH (Version 1.6.9 -16-d574870 64bit)<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=gmail-p1>I followed instructions at:&nbsp;<a href="https://wiki.freeswitch.org/wiki/Performance_testing_and_configurations">https://wiki.freeswitch.org/wiki/Performance_testing_and_configurations</a><o:p></o:p></p><p class=gmail-p1><b>[Questions]</b>&nbsp;&nbsp;<o:p></o:p></p><p class=gmail-p1>a) How to strip down Freeswitch and remove non-used modules?&nbsp;<o:p></o:p></p><p class=gmail-p1>Features I need:<o:p></o:p></p><p class=gmail-p1><b>esl, recording, loopback, bridge, sip, spandsp, cdr_csv.</b><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>My modules:&nbsp;</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1><b>fs_cli -x &quot;show modules&quot;</b></span><o:p></o:p></p><p class=gmail-p1><a href="http://pastebin.com/BQSxzFDE">http://pastebin.com/BQSxzFDE</a><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>b) I would like to see which module is using X/Y amount of CPU cycles/memory in Freeswitch is it possible?.</span><o:p></o:p></p><p class=gmail-p1><o:p>&nbsp;</o:p></p><p class=gmail-p1><span class=gmail-s1><b>fs_cli -x 'show status'</b></span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>UP 0 years, 0 days, 1 hour, 2 minutes, 15 seconds, 541 milliseconds, 286 microseconds</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>FreeSWITCH (Version 1.6.9 -16-d574870 64bit) is ready</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>18192 session(s) since startup</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>90 session(s) - peak 93, last 5min 92&nbsp;</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>5 session(s) per Sec out of max 30, peak 7, last 5min 6&nbsp;</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>1000 session(s) max</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>min idle cpu 0.00/75.57</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>Current Stack Size/Max 240K/8192K</span><o:p></o:p></p><p class=gmail-p1><o:p>&nbsp;</o:p></p><p class=gmail-p1><span class=gmail-s1>A sample image is below: 40% steady (no recording) a peak when I enabled recording.</span><o:p></o:p></p><p class=MsoNormal><img border=0 width=528 height=265 style='width:5.5in;height:2.7604in' id="_x0000_i1025" src="cid:image001.png@01D21D01.C3E3E170" alt="Inline image 1"><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=gmail-p1><span class=gmail-s1># top</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>top - 03:25:16 up 22:42,&nbsp; 1 user,&nbsp; load average: 3.88, 5.74, 10.39</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>Tasks:</span><span class=gmail-s2><b>&nbsp; 68&nbsp;</b></span><span class=gmail-s1>total,</span><span class=gmail-s2><b>&nbsp;&nbsp; 1&nbsp;</b></span><span class=gmail-s1>running,</span><span class=gmail-s2><b>&nbsp; 67&nbsp;</b></span><span class=gmail-s1>sleeping,</span><span class=gmail-s2><b>&nbsp;&nbsp; 0&nbsp;</b></span><span class=gmail-s1>stopped,</span><span class=gmail-s2><b>&nbsp;&nbsp; 0&nbsp;</b></span><span class=gmail-s1>zombie</span><o:p></o:p></p><p class=gmail-p3><span class=gmail-s3>%Cpu(s):</span><span class=gmail-s1><b>&nbsp;11.0&nbsp;</b></span><span class=gmail-s3>us,</span><span class=gmail-s1><b>&nbsp; 2.3&nbsp;</b></span><span class=gmail-s3>sy,</span><span class=gmail-s1><b>&nbsp; 0.0&nbsp;</b></span><span class=gmail-s3>ni,</span><span class=gmail-s1><b>&nbsp;85.7&nbsp;</b></span><span class=gmail-s3>id,</span><span class=gmail-s1><b>&nbsp; 0.0&nbsp;</b></span><span class=gmail-s3>wa,</span><span class=gmail-s1><b>&nbsp; 0.0&nbsp;</b></span><span class=gmail-s3>hi,</span><span class=gmail-s1><b>&nbsp; 0.7&nbsp;</b></span><span class=gmail-s3>si,</span><span class=gmail-s1><b>&nbsp; 0.4&nbsp;</b></span><span class=gmail-s3>st</span><o:p></o:p></p><p class=gmail-p3><span class=gmail-s3>KiB Mem:&nbsp;</span><span class=gmail-s1><b>&nbsp; 4057584&nbsp;</b></span><span class=gmail-s3>total,</span><span class=gmail-s1><b>&nbsp;&nbsp; 865964&nbsp;</b></span><span class=gmail-s3>used,</span><span class=gmail-s1><b>&nbsp; 3191620&nbsp;</b></span><span class=gmail-s3>free,</span><span class=gmail-s1><b>&nbsp;&nbsp; 147088&nbsp;</b></span><span class=gmail-s3>buffers</span><o:p></o:p></p><p class=gmail-p3><span class=gmail-s3>KiB Swap:</span><span class=gmail-s1><b>&nbsp; 1048572&nbsp;</b></span><span class=gmail-s3>total,</span><span class=gmail-s1><b>&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp;</b></span><span class=gmail-s3>used,</span><span class=gmail-s1><b>&nbsp; 1048572&nbsp;</b></span><span class=gmail-s3>free.</span><span class=gmail-s1><b>&nbsp;&nbsp; 213572&nbsp;</b></span><span class=gmail-s3>cached Mem</span><o:p></o:p></p><p class=gmail-p2><o:p>&nbsp;</o:p></p><p class=gmail-p4><span class=gmail-s1>&nbsp; PID USER&nbsp; &nbsp; &nbsp; PR&nbsp; NI&nbsp; &nbsp; VIRT&nbsp; &nbsp; RES&nbsp; &nbsp; SHR S&nbsp; %CPU %MEM &nbsp; &nbsp; TIME+ COMMAND &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><o:p></o:p></p><p class=gmail-p1><span class=gmail-s1>26217 freeswi+&nbsp; -2 -10 1427444 302584&nbsp; 16904 S&nbsp;&nbsp;<b>65.9</b>&nbsp; 7.5&nbsp; 28:47.49 freeswitch &nbsp; &nbsp; &nbsp;&nbsp;</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></div></body></html>