Performance Optimization

From Pbxnsip Wiki

Jump to: navigation, search

There are a few things that you can do to optimize the performance. Here is a checklist of what common problems are.

Media Awareness

  • Check if you have turned the flag “” off (see below). If this flag is on, the PBX must decode all audio streams in order to determine the volume on the audio. That obviously cost a lot of performance.

Image:perf_logg.gif

  • Make sure that you are not recording too many calls. Recording is an expensive operation, as the CPU must decode all audio streams, mix them with the other side and then compress the data before writing it to the file system. That will obviously cost a lot of CPU power. You can check if recording is on by checking if there are files being put into the “recording” directory on the system or by checking the recording flags in the web interface.

System Level

If you are running tools like Wireshark to monitor the system, that will slow down your system. There are rumors that the PCAP library also costs performance when installed on a Windows system, even if Wireshark is not running.

Also, sometimes other tools that evaluate the audio quality put themselves into the TCP/IP stack of the system. This will also cause performance. If you want to use such tools in a production system and you are running into performance problems, consider running these tools on a separate machine and use Ethernet port mirroring to feed this tool with the packets on the cable.

Of course, hading hardware acceleration for TCP/IP does help. Many modern PC automatically calculate checksums for Ethernet and IP packets, so that the processor is free from this task.

The system automatically tells the operating system to run only on one processor. You can verify that by checking the processor affinity of the PBX process.

Transcoding

Transcoding is another source for CPU-intense operations. Transcoding means that the PBX has to translate from one audio codec to another. That implies decoding the audio on one side and encoding it for the other. For each call, that means the PBX has to decode twice and encode twice. In addition to the CPU usage, such a transcoding generally reduces the audio quality, as each voice format represents the audio in a different way and transcoding will find the “common denominator” in the representation of the audio. In other words: Calls might sound like you are talking through a tin can in the early ages of telephony.

The PBX automatically tries to avoid transcoding. There are several things that you can check in order to avoid transcoding:

  • If you limit the codecs on trunk or extension level, that makes it more difficult for the system to find a common codec. Check if those limitations are really necessary.
  • Those limitations can be on the PBX, but they can also be on the endpoint. If your endpoint is configured to use only one specific codec, then if the other side does not support that codec you will end up in transcoding.
  • The general rule should be that you limit codecs only if it is necessary. Otherwise just leave the codec field on the PBX empty or allow all possible codecs on the endpoints and trunks.
Personal tools
Getting Help