System information
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.
†
Some telephony hardware vendors offer hardware-based echo cancella-
tion to remove the burden of this task from the host CPU. Echo cancellation is
discussed briefly later in this appendix and in more depth in Appendix B.
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
any non-Asterisk services the system is performing concurrently. Let’s take a look at
the effects of several key factors:
Codecs and transcoding
Simply put, a codec (short for coder/decoder, or compression/decompression) is a
set of mathematical rules that define how an analog waveform will be digitized.
The differences between the various codecs are due in large part to the levels of
compression and quality that they offer. Generally speaking, the more compression
that’s required, the more work the DSP must do to code or decode the signal.
Uncompressed codecs, therefore, put far less strain on the CPU (but require more
network bandwidth). Codec selection must strike a balance between bandwidth
and processor usage. For more on codecs, see Appendix B.
Central processing unit (and floating point unit)
A CPU is composed of several components, one of which is the floating point unit
(FPU). The speed of the CPU, coupled with the efficiency of its FPU, will play a
significant role in the number of concurrent connections a system can effectively
† Roughly 30 MHz of CPU power per channel.
642 | Appendix C: Preparing a System for Asterisk