[Freeswitch-users] What FS is doing when idle?

Anthony Minessale anthony.minessale at gmail.com
Tue Mar 2 11:05:06 PST 2010


FS is not really idle when idle.  Calls are not the only thing that cost
cpu.

Its a server daemon.  It has at least 25 threads up including the central
timer thread which is doing an endless-loop of 1ms sleeps.  You have an
active sip engine that still runs in a loop and many other moving parts.







On Tue, Mar 2, 2010 at 12:53 PM, Sergey Okhapkin
<sos at sokhapkin.dyndns.org>wrote:

> A program should not be visible in "top" when idle. That's my point.
>
> On Tuesday 02 March 2010, Anthony Minessale wrote:
> > I guess if you insist, you have 4 bad boxes with 4 bad kernels, and I bet
> > none of them are Centos 5.3
> > if you can reproduce it on a box I can visit (Centos 5.3 would be nice),
> > put in my ssh key and i'll come and look.
> >
> > Be sure to remember, as you continue to add to this thread that you are
> > complaining about FS using 2% of your cpu......
> > That's somewhat amusing to me.
> >
> > On Tue, Mar 2, 2010 at 12:23 PM, Giovanni Maruzzelli
> <gmaruzz at celliax.org>wrote:
> > > Sergey,
> > >
> > > that's not a problem, is how FS works.
> > >
> > > That load on the CPU when idle is actually not important. Is just the
> > > minimum, like in a carburettor.
> > >
> > > If you put it under load, you will see that there will need some
> > > serious load (many calls) to have it ramp up the cpu usage.
> > >
> > > -giovanni
> > >
> > > On Tue, Mar 2, 2010 at 7:16 PM, Sergey Okhapkin
> > >
> > > <sos at sokhapkin.dyndns.org> wrote:
> > > > I see the same problem on 4 absolutely different boxes with different
> > >
> > > linux
> > >
> > > > kernels.
> > > >
> > > > On Tuesday 02 March 2010, Anthony Minessale wrote:
> > > >> Well, there you go.
> > > >> your box is having a hard time doing a simple 1ms sleep in a loop
> for
> > >
> > > the
> > >
> > > >> centralized core timer.
> > > >>
> > > >> It's either your kernel or your box.  My box and every box I have do
> > > >> not have that problem so you may want to consider a new one.
> > > >>
> > > >> FreeSWITCH is FREE so give it a good home.
> > > >>
> > > >> The good news is, you can make upwards of 1500 calls on that same 2%
> > > >> of
> > >
> > > cpu
> > >
> > > >> usage.
> > > >>
> > > >>
> > > >>
> > > >> On Tue, Mar 2, 2010 at 11:51 AM, Sergey Okhapkin
> > > >>
> > > >> <sos at sokhapkin.dyndns.org>wrote:
> > > >> > FS spends half of CPU here (main thread):
> > > >> >
> > > >> > #0  0xffffe424 in __kernel_vsyscall ()
> > > >> > #1  0xb7a82781 in select () from /lib/libc.so.6
> > > >> > #2  0xb7e392eb in apr_sleep () from
> > > >> > /opt/freeswitch/lib/libfreeswitch.so.1 #3  0x00000000 in ?? ()
> > > >> >
> > > >> > The second half is spent here:
> > > >> >
> > > >> > #0  0xb7d50946 in clock_nanosleep () from /lib/librt.so.1
> > > >> > #1  0xb7e0fa7d in softtimer_runtime () at src/switch_time.c:155
> > > >> > #2  0xb7dc585a in switch_loadable_module_exec (thread=0xb7101fb8,
> > > >> > obj=0xb7101da8) at src/switch_loadable_module.c:96
> > > >> > #3  0xb7e379a8 in dummy_worker () from
> > > >> > /opt/freeswitch/lib/libfreeswitch.so.1
> > > >> >
> > > >> > On Tuesday 02 March 2010, Moises Silva wrote:
> > > >> > > ps -LlFm -p `pidof freeswitch`
> > > >> > >
> > > >> > > That shows you CPU usage per FreeSWITCH thread
> > > >> > >
> > > >> > > Then
> > > >> > >
> > > >> > > pstack `pidof freeswitch`
> > > >> > >
> > > >> > > That shows the stack trace of every FreeSWITCH thread and then
> you
> > >
> > > can
> > >
> > > >> > find
> > > >> >
> > > >> > > exactly what is doing.
> > > >> >
> > > >> > _______________________________________________
> > > >> > 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
> > > >
> > > > _______________________________________________
> > > > 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-user
> > > >s http://www.freeswitch.org
> > >
> > > --
> > > Sincerely,
> > >
> > > Giovanni Maruzzelli
> > > Cell : +39-347-2665618
> > >
> > > _______________________________________________
> > > 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
>
>
>
> _______________________________________________
> 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

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100302/3f6af841/attachment-0002.html 


More information about the FreeSWITCH-users mailing list