kmp_cc_in_mem_limit
Sets the maximum memory limit for caching Kaltura Media Framework common components.
Description
The kmp_cc_in_mem_limit directive is used within the Kaltura Media Framework Common NGINX Module to specify the maximum amount of memory allocated for in-memory caching of component data, which is crucial for optimizing performance during streaming media operations. When this limit is reached, the cache will purge the least recently used entries to free up space for new incoming data. This behavior allows the server to manage memory resources effectively while maximizing caching efficiency for frequently accessed media components.
The directive accepts one argument, which should be a value denoting the memory limit. The value can be specified in bytes or with suffixes like 'k', 'm', or 'g' for kilobytes, megabytes, and gigabytes respectively. By configuring this directive, one can fine-tune the memory usage based on the server specifications and the expected load of media components. If the limit is set too low, frequent cache purges may occur, potentially leading to decreased performance while serving media content. Conversely, setting it too high may exhaust the server's memory, impacting overall server stability.
This functionality is especially important in high-traffic streaming scenarios where optimal resource management is critical to stream quality and application responsiveness. Thus, monitoring application behavior and adjusting kmp_cc_in_mem_limit accordingly ensures a balance between memory utilization and performance requirements.
Config Example
stream {
kmp_cc_in_mem_limit 256m;
}Setting the limit too low can lead to frequent cache misses and performance degradation.
Setting the limit too high may consume excessive server memory, affecting other applications.
Ensure that the memory limit does not exceed available physical memory to avoid swapping.