ts_kmp_mem_high_watermark
The `ts_kmp_mem_high_watermark` directive sets the high watermark for memory usage by Kaltura Media Protocol (KMP) connections.
Description
The ts_kmp_mem_high_watermark directive configures a threshold for memory consumption incurred by Kaltura Media Protocol (KMP) within NGINX. Specifically, it indicates the maximum amount of memory that can be allocated for KMP streams before the module starts applying memory management techniques to prevent excessive resource usage. This is particularly important for high-load environments where managing memory effectively is crucial to maintaining performance and stability.
By setting this directive, administrators can ensure that if the total memory used by KMP exceeds the specified limit, measures will be taken to alleviate memory pressure. These measures could include dropping streams or throttling connections to preserve overall server functionality. Administrators should carefully monitor memory usage and adjust this value according to the hardware specifications and expected load on the media streaming services to avoid service disruptions and ensure optimal performance.
This directive should be set in either the stream or stream server context, enabling fine control over the resources used for specific virtual servers or stream blocks. Given its implications on the server's memory management, careful tuning is essential, especially in systems with multiple concurrent streams or limited RAM resources.
Config Example
stream {
server {
ts_kmp_mem_high_watermark 256m;
}
}Setting the value too low may result in dropped streams.
Providing a value that is not aligned with the server's available memory can lead to performance issues.