Why Asterisk Uses High CPU
Asterisk is inherently CPU-intensive because it processes real-time audio streams. Unlike a web server that handles bursty traffic, Asterisk must process audio packets every 20ms per call without interruption. The main CPU consumers are:
| CPU Consumer | Impact | Typical Load Per Call |
|---|---|---|
| Codec Transcoding | Very High | ~20-30% of a single core per G.729 transcode |
| Recording (MixMonitor) | Medium | Additional file I/O and mixing per recorded call |
| Conference Bridges | High | Scales with number of participants (mixing audio) |
| Dialplan Processing | Low-Medium | Depends on complexity; loops can spike CPU |
| AMI/ARI Events | Low-High | Can flood CPU if many subscribers or debug events |
| TLS/SRTP Encryption | Low-Medium | Initial handshake is CPU-intensive; ongoing is minimal |