[Freeswitch-users] Performance optimization and stack size value
Kevin Mathy
k.mathy at hexanet.fr
Wed Feb 19 18:44:08 MSK 2014
Right, I'll ask for it !
*Bien cordialement, Best Regards, **Kevin MATHY* | Ingénieur VoIP
2014-02-19 6:26 GMT+01:00 Brian West <brian at freeswitch.org>:
> Since the wiki is wrong you may update that page by requesting an account.
>
> Sent from my iPad
>
> On Feb 18, 2014, at 4:08 AM, Kevin Mathy <k.mathy at hexanet.fr> wrote:
>
> Hi Peter, Anthony,
>
> Thanks for your answers.
> Indeed, if I wanted to increase the stack size, it was just because of the
> advices written on this wiki page :
> http://wiki.freeswitch.org/wiki/Performance_testing_and_configurations
>
> I'm just a bit aware of how works internally a Linux OS, and so I simply
> followed what was said on the wiki, thinking that it'll be OK.
> But in fact, it's not...
>
> Anyway, I'll follow what you said, and let the stack size value to 240k,
> as FS doesn't need to use more. Thank you for this information.
>
> Otherwise, when I make a "top" on my system, I've got the following output
> :
>
>> Tasks: 138 total, 1 running, 137 sleeping, 0 stopped, 0 zombie
>> Cpu0 : 2.0%us, 1.3%sy, 0.0%ni, 95.0%id, 0.0%wa, 0.0%hi, 1.7%si,
>> 0.0%st
>> Cpu1 : 1.3%us, 2.3%sy, 0.0%ni, 96.4%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Cpu2 : 0.7%us, 0.7%sy, 0.0%ni, 98.7%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Cpu3 : 0.7%us, 2.0%sy, 0.0%ni, 97.4%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Cpu4 : 2.0%us, 1.7%sy, 0.0%ni, 96.4%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Cpu5 : 1.0%us, 1.7%sy, 0.0%ni, 97.3%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Cpu6 : 0.3%us, 0.7%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Cpu7 : 0.3%us, 1.0%sy, 0.0%ni, 98.7%id, 0.0%wa, 0.0%hi, 0.0%si,
>> 0.0%st
>> Mem: 16455916k total, 3046676k used, 13409240k free, 356088k buffers
>> Swap: 7128056k total, 0k used, 7128056k free, 2373412k cached
>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ P COMMAND
>>
>>
>>
>>
>> 3497 freeswit -2 -10 505m 92m 6812 S *25 * 0.6 1430:38 5
>> freeswitch
>
>
> In which we can see that FS seems to use 25% of CPU ressources, but all
> CPUs seem to be around 7% used (all counted).
> So my question is : which one is the real value about CPU percentage used
> ?
>
> I'm remember that FS has a function to refuse new calls if a CPU used
> precentage threshold is reached, and I'd like to set this value as well as
> possible. And for that I have to know the real usage of my CPU by FS.
>
> Thanks a lot for your help,
>
>
>
> *Bien cordialement, Best Regards, **Kevin MATHY* | Ingénieur VoIP
>
>
>
> 2014-02-14 20:28 GMT+01:00 Anthony Minessale <anthony.minessale at gmail.com>
> :
>
>> Stack size is how much ram is reserved per thread open. We only need
>> 240k and you are offering to let it use 8 megs.
>>
>>
>>
>>
>> On Fri, Feb 14, 2014 at 8:57 AM, Peter Olsson <peter at olssononline.se>wrote:
>>
>>> Why do you want to increase stack size? FS tries to keep it as low as
>>> possible.
>>>
>>>
>>> 2014-02-14 15:45 GMT+01:00 Kevin Mathy <k.mathy at hexanet.fr>:
>>>
>>>> Hi List,
>>>>
>>>> I'm trying to make my FS server more performant and reliable, and I
>>>> found the FS's wiki page telling that I can change some "ulimit" values on
>>>> my system, like the Stack Size.
>>>>
>>>> So, I've changed in the init script the "ulimit -s" value to 8192, but
>>>> now when I start freeswitch I've got the following error message :
>>>>
>>>>> Error: stacksize 8192 is not optimal: run ulimit -s 240 from your
>>>>> shell before starting the application.
>>>>> auto-adjusting stack size for optimal performance...
>>>>
>>>>
>>>> So when I check the status :
>>>>
>>>>> freeswitch at 10.84.9.41@internal> status
>>>>> UP 0 years, 0 days, 0 hours, 0 minutes, 6 seconds, 661 milliseconds,
>>>>> 592 microseconds
>>>>> FreeSWITCH (Version 1.3.17 git 16289ce 2013-03-14 03:24:25Z) is ready
>>>>> 0 session(s) since startup
>>>>> 0 session(s) - 0 out of max 30 per sec
>>>>> 1000 session(s) max
>>>>> min idle cpu 0.00/100.00
>>>>> Current Stack Size/Max 240K/8192K
>>>>
>>>>
>>>> It seems that the 8192 value isn't set and is rollbacked to 240...
>>>> I've got exactly the same result when the init script is filled with
>>>> "ulimit -s 240".
>>>>
>>>> Do you have any idea about how to have the stack size increased ?
>>>>
>>>> Thanks a lot,
>>>>
>>>>
>>>>
>>>> *Bien cordialement, Best Regards, **Kevin MATHY* | Ingénieur VoIP
>>>>
>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>>
>>>>
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://wiki.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>>
>>>
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>>
>>
>> --
>> Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
>>
>> ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
>> http://twitter.com/FreeSWITCH
>> ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
>> <http://freeswitch.org/g+>*
>>
>> ClueCon Weekly Development Call
>> ☎ sip:888 at conference.freeswitch.org ☎ +19193869900
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>>
>>
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140219/d890816e/attachment-0001.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list