This article explains methods for tuning Wowza Streaming Engine™ media server software for optimal performance with WebRTC.
Optimize Transcoder Memory Utilization (Linux Only)
When using Wowza Streaming Engine to perform transcoding, your memory utilization may get higher than expected. Under certain circumstances, this can cause out of memory issues and may result in server crashes. The most common reason this occurs is multiple publish/unpublish of streams, for example, if you frequently publish/unpublish while streaming WebRTC.
To prevent memory over utilization, configure the MALLOC_ARENA_MAX parameter to limit the number of arenas allowed per CPU core. By default, this is set to 8 x Processor Cores. Limiting the number of arenas could impact performance; we recommend starting by limiting the number of arenas allowed per CPU core to 4 x Processor Cores and then limiting more if needed.
- For a server with 8 processor cores, start by limiting the number of arenas allowed per CPU core to 32 (4 x 8):
- If the memory utilization is still high, limit the number of arenas further until you prevent memory over utilization:
Note: MALLOC_ARENA_MAX can be set to as low as 1, but performance could be impacted.
Add the parameter as an entry at the end of the setenv.sh file found in [install-dir]/bin/ as shown in the preceding examples. After you save your changes, restart Wowza Streaming Engine.