Page 42 - Asterisk™: The Future of Telephony
P. 42

Performance Issues
               Among other considerations, when selecting the hardware for an Asterisk installation
               you must bear in mind this critical question: how powerful must the system be? This
               is not an easy question to answer, because the manner in which the system is to be used
               will play a big role in the resources it will consume. There is no such thing as an Asterisk
               performance-engineering matrix, so you will need to understand how Asterisk uses the
               system in order to make intelligent decisions about what kinds of resources will be
               required. You will need to consider several factors, including:
               The maximum number of concurrent connections the system will be expected to support
                   Each connection will increase the workload on the system.
               The percentage of traffic that will require processor-intensive DSP of compressed codecs
               (such as G.729 and GSM)
                   The Digital Signal Processing (DSP) work that Asterisk performs in software can
                   have a staggering impact on the number of concurrent calls it will support. A system
                   that might happily handle 50 concurrent G.711 calls could be brought to its knees
                   by a request to conference together 10 G.729 compressed channels. We’ll talk more
                   about G.729, GSM, G.711, and many other codecs in Chapter 8.
               Whether conferencing will be provided, and what level of conferencing activity is expected
                   Will the system be used heavily? Conferencing requires the system to transcode
                   and mix each individual incoming audio stream into multiple outgoing streams.
                   Mixing multiple audio streams in near-real-time can place a significant load on the
                   CPU.
               Echo cancellation
                   Echo cancellation may be required on any call where a Public Switched Telephone
                   Network (PSTN) interface is involved. Since echo cancellation is a mathematical
                   function, the more of it the system has to perform, the higher the load on the CPU
                          †
                   will be.   Do not fear. Echo cancellation is another topic for Chapter 8.
               Dialplan scripting logic
                   Whenever Asterisk has to pass call control to an external program, there is a per-
                   formance penalty. As much logic as possible should be built into the dialplan. If
                   external scripts are used, they should be designed with performance and efficiency
                   as critical considerations.
               As for the exact performance impact of these factors, it’s difficult to know for sure. The
               effect of each is known in general terms, but an accurate performance calculator has
               not yet been successfully defined. This is partly because the effect of each component
               of the system is dependent on numerous variables, such as CPU power, motherboard
               chipset and overall quality, total traffic load on the system, Linux kernel optimizations,
               network traffic, number and type of PSTN interfaces, and PSTN traffic—not to mention



               † Roughly 30 MHz of CPU power per channel.

               14 | Chapter 2: Preparing a System for Asterisk
   37   38   39   40   41   42   43   44   45   46   47