[Asterisk-Users] Nested MySQL Commands
Chris Albertson
chrisalbertson90278 at yahoo.com
Wed Jan 11 15:01:57 MST 2006
Under Linux (and other OSes) It's not as bad as that. Even with
128 Perl processes running there is only one copy of the Perl
interpeter in memory. Each of the 128 running processes would
have it's own copy of only it's data segments. With Perl
already in memory the biggest system overhead would be
process creation.
The best design is the one that minimizes the number of
process that the kernel has to create. Notice that this is
why the Apache Perl modual is so much faster than using
Perl from a CGI script
Perl connecting to a central DBMS server is already the model
you describe: 128 light weight procees connected to one
"big" process which is the DBMS server.
Performance gains will come from writting the SQL so that there
is only one transaction and using indexes on the "right"
columns in the database.
If you really do have 128 process runing and each one needs
to access a DBMS server, I'd say you are going to need a
very powerful DBMS system but likly the call volume is not
neraly like that
--- John Daragon <john at argv.co.uk> wrote:
> Douglas Garstang wrote:
> > Peter, I assume you mean something like this in extensions.conf:
> >
> > exten => _X.,1,AGI(master-dial-logic.pl)
> >
> > and then there's only one call. All logic would be performed by
> > the perl script. This has many advantages. One disadvantage
> however
> > is that potentially, there could be 120 simultaneous instances of
> > this script running (one per call).
>
> Yes, but if you need it to scale efficiently, each of these could
> be a very lightweight process. If you used each of these to
> communicate
> via RPC or shared memory to a process with a small and configurable
> pool
> of database connections (which isn't that difficult), you can build a
> simple and scalable solution.
>
> jd
>
> --
>
> John Daragon john at argv.co.uk
> argv[0] limited (Asterisk implementation & consultancy)
> Lambs Lawn Cottage, Staple Fitzpaine, Taunton, TA3 5SL, UK
> v +44 (0) 1460 234068 f +44 (0) 1460 234069 m +44 (0) 7836 576127
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
Chris Albertson
Home: 310-376-1029 chrisalbertson90278 at yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson at aero.org
KG6OMK
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the asterisk-users
mailing list