quick-cartoon-22764
11/24/2025, 1:24 PMtall-airline-16756
11/24/2025, 1:25 PMtall-airline-16756
11/24/2025, 1:25 PMnum_idle_processes.
• Only preload essential models in your prewarm function so idle memory is smaller.
If memory continues to grow over time or exceeds system capacity, we can dig into prewarm logic, inspect process memory profiles, and look for leaks. Would you like steps to check which models are loaded or guidance on changing num_idle_processes?
Sources: Agent server options | LiveKit docs | Deploying to custom environments | LiveKit Docsquick-cartoon-22764
11/24/2025, 1:33 PMtall-airline-16756
11/24/2025, 1:33 PMnum_idle_processes.
◦ Avoid preloading large models in prewarm or preload only essential components.
◦ Replace heavy model runtimes with lighter alternatives if possible.
If you want, I can help decide whether to raise pod memory, shrink prewarm usage, or both—tell me which models/plugins your agents load or the current num_idle_processes and pod memory limits.quick-cartoon-22764
11/24/2025, 1:34 PMtall-airline-16756
11/24/2025, 1:34 PMnum_idle_processes and you preloaded the Silero VAD, here’s a focused plan.
Why the warning still appears
• Silero VAD stays resident after prewarm and consumes significant RAM per agent process, so each pod’s baseline memory stays high even when idle.
• Reducing pod count (more pods) won’t lower per-pod memory; the warning is per-process/per-pod.
Recommended actions (short-term → long-term)
1. Increase pod memory limits/requests so each pod can comfortably hold the prewarmed Silero model. This directly prevents the per-pod warning.
2. Tune num_idle_processes downward if you can tolerate slightly higher cold-start latency; fewer idle processes = less total idle memory per pod.
3. Modify prewarm behavior:
◦ Preload only essential parts of Silero (if possible) or lazy-load the heavier components on first use.
◦ Move heavy models to a shared model-serving service (if architecture allows) so agents fetch audio-level results instead of hosting the full model.
1. Consider lighter VAD alternatives or smaller model variants if maintaining low pod memory is a priority.
Next step Would you like commands/examples to:
• Update Kubernetes pod memory requests/limits,
• Change num_idle_processes safely, or
• Inspect current process memory usage to quantify how much Silero is using?quick-cartoon-22764
11/24/2025, 1:35 PMtall-airline-16756
11/24/2025, 1:35 PMnum_idle_processes, two things are likely happening: the agent processes keep the Silero model resident in memory, and the system is using the default number of idle processes (which can be higher than you expect), so each pod’s baseline RAM is higher.
What to do next
• Set num_idle_processes to a lower value to reduce how many idle agent processes keep the model in memory (tradeoff: slightly higher cold starts).
• Increase pod memory requests/limits so each pod can hold the prewarmed Silero model without triggering the warning.
• If you want further reductions, change prewarm behavior to lazy-load Silero or preload only essential parts, or serve the model from a shared inference service.
Would you like an example of safe num_idle_processes values to try and Kubernetes manifest snippets to raise pod memory?quick-cartoon-22764
11/24/2025, 1:37 PMtall-airline-16756
11/24/2025, 1:37 PMnum_idle_processes values to test, and a Kubernetes pod/container resource snippet to raise memory.
Suggested num_idle_processes values to try
• Start with 1 (lowest idle memory, highest cold-start latency).
• If 1 causes too many cold starts, try 2 or 3.
• Monitor memory and cold-start latency, then pick the smallest value that keeps latency acceptable.
Kubernetes container resource example
• Update your Deployment/StatefulSet container spec to increase requests/limits. Replace names and values to match your cluster and expected model footprint.
spec:
containers:
- name: livekit-agent
image: your-registry/livekit-agent:tag
resources:
requests:
memory: "2Gi"
cpu: "500m"
limits:
memory: "4Gi"
cpu: "1"
env:
- name: NUM_IDLE_PROCESSES
value: "1"
Notes
• Set requests.memory to the minimum memory each pod should get at scheduling time and limits.memory to the maximum the pod may use.
• If Silero plus runtime needs more than 2Gi, raise these values — observe actual RSS per process to choose a safe value.
• After applying changes, watch pod memory usage and agent logs for the warning to confirm resolution.
Would you like a kubectl command to patch an existing Deployment or a manifest tuned for your current pod memory usage if you share the current values?