miniature-egg-88949
12/08/2025, 11:57 AMtall-airline-16756
12/08/2025, 11:57 AMtall-airline-16756
12/08/2025, 11:57 AMnumIdleProcesses: 5 means the agent keeps 5 worker processes warmed and ready — but that doesn't strictly equal the total concurrent calls the server can handle.
Key points:
• Each worker handles one job at a time, and the agent can spawn additional processes beyond the 5 idle ones as load increases.
• numIdleProcesses only reduces cold-start latency by keeping 5 ready; it does not cap concurrency.
• Actual concurrent capacity depends on hardware (CPU, RAM, network), the work each call does (VAD/STT/LLM/TTS), and external API latency.
Quick guidance:
• With 5 idle processes you can immediately accept 5 calls with no warm-up delay; additional simultaneous calls will trigger new processes.
• As a rough production guideline, a 4-core / 8 GB machine often handles ~10–25 concurrent jobs (and in one lightweight test reached ~30), but your mileage will vary.
If you’d like, tell me:
• your machine specs (CPU cores, RAM),
• typical per-call workload (which processing steps you use),
and I’ll help estimate expected concurrency and suggest test settings (load thresholds or scaling).
Sources: Agent server options | LiveKit docs | Deploying to custom environments | LiveKit docsminiature-egg-88949
12/08/2025, 12:10 PMtall-airline-16756
12/08/2025, 12:10 PMminiature-egg-88949
12/08/2025, 12:11 PMtall-airline-16756
12/08/2025, 12:11 PMload_threshold, the agent stops accepting new jobs. Default is 0.7.
◦ Use this to prevent accepting work when the host is too busy.
• load_fnc
◦ A customizable function that returns a float 0.0–1.0 representing current load. By default it returns average CPU utilization over a 5‑second window.
◦ You can replace it to base load on active job count, memory, or any metric (example: len(agent_server.active_jobs)/10).
• num_idle_processes (prewarm)
◦ Number of worker processes kept warmed and ready (your current 5). This reduces cold-start latency but does not cap total workers.
Operational guidance:
• The agent spawns extra workers while the computed load_fnc value is below load_threshold. There is no hard-coded upper limit in the agent; maximum workers are constrained by host resources and any OS/container limits you set (ulimits, K8s quotas).
• For autoscaling decisions at infra level, use the same metric as load_fnc and scale up at a lower threshold than load_threshold (for example, scale up infra at 0.5 if load_threshold is 0.7) so new capacity is ready before the agent stops accepting jobs.
If you want specific numbers for your deployment, tell me:
• host CPU cores and RAM
• typical per-call workload (VAD/STT/LLM/TTS)
• any container/OS process limits you’ve set Sources: Agent server options | LiveKit docs | Deploying to custom environments | LiveKit docs