c
hi
t
Thanks for reaching out, Arun. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi — thanks for reaching out! How can I help today? If you’re not sure where to start, here are a few things I can assist with: • Troubleshooting connection, audio, or video issues • Guidance on SDKs, room setup, or authentication • Billing or account questions • Integrations and examples (web, iOS, Android) • Anything else you’re working on — tell me what you’re trying to build or what error you see Share a bit more (error messages, project/room IDs, SDK and version, a short description of the problem) and I’ll help you next.
c
"""Number of seconds to wait for current jobs to finish upon receiving TERM or INT signal.""" num_idle_processes: int | ServerEnvOption[int] = ServerEnvOption( dev_default=0, prod_default=min(math.ceil(get_cpu_monitor().cpu_count()), 4) ) what is it emans
t
Thanks — I’m happy to explain. You pasted a snippet configuring
num_idle_processes
. In short: this setting controls how many idle agent processes the server keeps “warm” and ready to handle new jobs without having to start a fresh process each time. What it does • Keeps a pool of pre-spawned processes that have models/resources loaded (e.g., VAD or STT), so new jobs start faster. • Reduces the latency caused by process startup and model loading. Defaults in the snippet you shared • Dev default:
0
— no prewarmed processes in development. • Prod default:
min(math.ceil(get_cpu_monitor().cpu_count()), 4)
— use up to the number of CPU cores, capped at 4, in production. When to increase or decrease it • Increase if your jobs require heavy model loading and you need fast job start times. • Decrease (or keep 0) if you want to conserve memory/CPU and can tolerate longer startup time per job. One more clarification • The quoted line you showed ("Number of seconds to wait for current jobs to finish upon receiving TERM or INT signal.") refers to a different setting (
drain_timeout
), not
num_idle_processes
.
num_idle_processes
does not control shutdown wait time — it controls how many idle processes are prewarmed. Would you like help choosing a value for your environment (tell me your typical job load, model size, and memory per process), or do you want the exact config name for the shutdown timeout so I can explain that one too? Sources: Server options | LiveKit Documentation | Silero VAD plugin | LiveKit Documentation