[Freeswitch-users] help with mod_conference stability
anthony.minessale at gmail.com
Fri May 15 06:20:39 PDT 2009
Unfortunately, no scripting language we have encountered
has ever done proper threading to the point that you could even begin to do
Lua is one of the better ones in a threaded env only because they solved the
problem by making a tiny VM that
can be easily reproduced thousands of times. You still can't share a lua vm
across threads or it will crash because they
use lots of setjmp longjmp calls to travel between their virtual stack and
the real one.
As a matter of fact, spidermonkey has code that tries to be threadsafe (but
you have to enable it, --with-threadsafe makes me nervous =]) and it shares
as much as it can already and we have debated changing it so it creates a
JS instance per call just because of all the garbage collection and thread
safety issues we have encountered.
you have to call a whole bunch of hidden mutexes marked suspend and resume
etc everywhere in the code where you
transition from executing script side code to a blocking FreeSWITCH
Really, the only point in my original comment was that if you want to scale
up something that uses scripting the first way to save
resources is to not leave the script open while you do something you know
will take a long time "playing a 2 hour file, bridging a call, joining a
conference" because the script resources are allocated and doing nothing
this whole time and they all share a global garbage collector. if you don't
need to remain in the script just transfer the call to a static extension
and close it. It's just a suggestion really.
On Thu, May 14, 2009 at 4:56 PM, David Knell <dave at 3c.co.uk> wrote:
> On Thu, 2009-05-14 at 12:31 -0500, Brian West wrote:
> > Its obvious if you look at the size of the JS VM vs the lua VM.. it
> > would clearly scale better not needing megs and megs of ram per call
> > vs about 160kb for lua.
> Isn't this a bit of a non sequitur, given that there ought to be just
> one copy of the JS interpreter in RAM which is shared across all of the
> calls/threads which need to use it?
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
Anthony Minessale II
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>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-users