kmp_mem_high_watermark
The `kmp_mem_high_watermark` directive configures the maximum memory usage threshold for the Kaltura Media Framework components managed by NGINX.
Description
The kmp_mem_high_watermark directive is utilized within the Kaltura Media Framework to specify the upper limit of memory usage that the media processing components can consume. This parameter is essential for managing resources efficiently, particularly during live video streaming, where memory usage can fluctuate significantly due to varying input loads and streams. When the memory usage of the process exceeds the threshold defined by this directive, the framework can trigger alerts or take predefined actions to mitigate excessive memory usage, ensuring system stability and performance.
To use this directive, you would typically set it in the server or location block within your NGINX configuration file. The value assigned to this directive must be a numeric value representing the memory threshold in bytes. The exact value would depend on the available system resources and the expected load on the media streaming components. It is recommended to monitor memory usage and adjust this value as needed to optimize performance while preventing service degradation due to memory overconsumption.
The behavior of this directive can affect various operational aspects of the Kaltura components. Specifically, if the memory usage exceeds this watermark, it may lead to throttling, temporary service disruptions, or interventions from the orchestration controller, which manages the media streaming workflows. Thus, setting this directive correctly is vital for achieving a balance between performance and resource utilization in live streaming applications.
Config Example
server {
kmp_mem_high_watermark 104857600; # Set high watermark to 100 MB
}Setting this value too high may lead to excessive memory consumption under high load situations.
If this value is set too low, it may cause frequent memory-related actions that could disrupt streaming services.