[asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

David Backeberg dbackeberg at gmail.com
Mon Jul 11 20:06:45 CDT 2011


On Mon, Jul 11, 2011 at 5:29 PM, Steve Edwards
<asterisk.org at sedwards.com> wrote:
> Many times, I've made the statement that you can execute hundreds of AGIs
> written in C in the time it takes to load an interpreter and parse a script
> written in PHP or Perl.

I've truly enjoyed this thread. And while startup time is certainly
part of the equation, I'm curious whether you also recorded memory
overhead while you were doing your benchmarks.

In my personal observation of 'Perl running in production', there's a
significant memory complexity associated with running lots of
simultaneous Perl interpreters. I'm guessing the PHP overhead is
smaller but still a factor.

Because C lib is both statically compiled and essentially built into
the system, there's no such 'waste' of running the interpreters.

Along with the narrowing gap you saw by 'throwing hardware at the
problem' that shrinks the difference between C and interpreted
languages, I personally now work with a production asterisk
environment where systems have dozens of GB of ram. As such, it's not
entirely crazy to say 'so what' about the whole thing.

Nonetheless, do you have any numbers to back up my theory?



More information about the asterisk-users mailing list