kmp_rtmp_in_max_free_buffers
Defines the maximum number of free buffers that can be utilized for incoming RTMP streams in Kaltura's NGINX module.
Description
The kmp_rtmp_in_max_free_buffers directive specifies the upper limit on the count of free buffers that can be allocated for incoming RTMP (Real-Time Messaging Protocol) connections. This directive is crucial for optimizing memory management during streaming scenarios by ensuring that the server does not allocate excessive resources, which could potentially lead to performance degradation. Implementing a reasonable value can balance resource efficiency and performance responsiveness, particularly under high-load scenarios where multiple streams may be processed simultaneously.
The parameter for this directive accepts a single argument that represents the maximum number of free buffers that NGINX can maintain. Once the threshold is reached, any new incoming requests will have to wait until old buffers are reused or freed. This mechanism is essential in maintaining system stability, especially during peak streaming times when resource allocation is critical. Administrators should monitor the use of these buffers to make adjustments as necessary based on the server's performance and workload demands.
Config Example
stream {
server {
kmp_rtmp_in_max_free_buffers 512;
}
}Setting this value too high can lead to unnecessary memory consumption, while setting it too low may cause delays in buffer allocation during high traffic.
Be sure to monitor performance metrics when adjusting this directive to find the optimal balance for your particular use case.