[asterisk-users] Benchmarking AGI performance in C, PHP, and Perl
Gordon Henderson
gordon+asterisk at drogon.net
Tue Jul 12 11:30:43 CDT 2011
On Tue, 12 Jul 2011, Matthew J. Roth wrote:
> Just think how fast Linux would boot if all of the init scripts were
> rewritten in C and compiled (they probably have some pipes that could be
> removed, too!!). Of course, it's pretty nice to be able to easily read and
> modify them, but execution time is all that's important, right?
Very probably the wrong place to duscuss this, however... I build embedded
linux boxes for a variety of purposes (including asterisk), and I have to
say that boot-time isn't always a factor. Really, when you have a box with
an uptime of:
# uptime
22:22:21 up 1374 days, 2:42, 2 users, load average: 0.00, 0.02, 0.00
who really cares how long it take to boot.
The Linux kernel itself can boot in under a second - trouble is, it can
take 15-20 seconds going through a PCs BIOS to get there, then it's init
scripts, loading modules, etc. A lot of these are waiting on hardware, or
the network coming up and compiling them isn't going to help much...
In properly embedded systems you can get to application very fast (no
init/scripts!), however in more general purpose systems, I feel it's
diminishing returns time. I've also moved from sysv-rc to file-rc too -
which completely serialises scripts - which might seem a backwards step,
but it gives easier control and I'm happy that my PBXs go from cold to
ready in under a minute, and my (getting old now) Acer Aspire One goes
from cold to workable GUI in 45 seconds. I can live with that.
Gordon
More information about the asterisk-users
mailing list