Memory issues can significantly impact the performance of your Linux system and, consequently, your Wowza Streaming Engine. This article explains common memory problems, their causes, and how to troubleshoot and resolve them effectively.
Basic understanding of heap vs system memory:
Heap memory is a block of system memory that is reserved for the JVM to use. The size of the reserved heap is adjusted as needed up to the max heap size setting. It's used to store Java objects that are created by the Java process.
The Java process also creates non-java objects and data, and this is stored in system memory. This includes direct byte buffers, files, network buffers, and any memory used by related native processes like transcoder and SRT. The total memory graph includes all of the physical system memory that is in use by all processes. It includes the reserved heap memory and all of the system data that is used by the Java process.
We don't really have an easy way to separate the total memory used by the Wowza process from the total system memory.
If you feel that your system memory is running higher than expected, to view all the system memory that could be used by direct byte buffers, files, network buffers, and any memory used by related native processes like transcoder and SRT, follow the below steps:
- Find out what Java process Linux is using, go into the Wowza Java directory:
/usr/local/WowzaStreamingEngine/jre/bin
It will print out the engine and manager Java PID’s. The engine one will be the Bootstrap start process:
2739 com.wowza.wms.bootstrap.Bootstrap start
2. To create a log that shows all open files that is used by the Wowza Streaming Engine service (PID), enter the below terminal command:
sudo lsof -p 2739 > files.log
Replace 2739 with your Bootstrap start PID.
3. Review the files.log file to see what open files are in use:
It's possible that it will print out multiple thread id's and you should just filter for the Wowza Streaming Engine pid (2739).
4. If you need further review of your system memory use, please create a support ticket with attaching the created log file.