my Livekit cloud worker is CPU throttling when run...
# ask-ai
a
my Livekit cloud worker is CPU throttling when running 3-4 parrallel sessions with significant CPU spikes when opening new sessionsthe close i am to 4. The livekit workere CPU is the bottlneck. Im working on the build plan. Will autoscaling be on for the starter plan, will I have access to multiple replicas -eg im paying for 20 sessions so will the system autoscale to those 20 sessions even if im running some heavier models underneath and it will mean that I need a bit more CPU that an average user?
t
Thanks for reaching out, Michał. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you: your worker is CPU-throttling when you open a few concurrent, CPU-heavy sessions and you want to know whether LiveKit Cloud will autoscale and give you multiple replicas to handle the load (and whether paying for “20 sessions” will let the system scale to that level when sessions are heavier than average). Short answer • Yes — LiveKit Cloud (Build plan) performs automatic autoscaling and uses multiple worker replicas so sessions can be distributed across instances. • However, the Build plan is limited to 5 concurrent agent sessions. Autoscaling will help, but it will not exceed your plan’s concurrency cap. If you need 20 concurrent sessions you’ll need a plan that allows 20 (Ship) or higher. What’s happening with your CPU spikes • If each session is CPU‑intensive (heavy VAD/ASR/TTS or model inference), a single worker can become the bottleneck even with only 3–4 sessions, which causes the throttling and spikes you’re seeing. • Autoscaling will create more worker instances and load‑balance sessions across them (agents that share the same
agent_name
are treated as a pool), which reduces per‑worker load — but autoscaling operates within your plan’s concurrency limits. Practical recommendations 1. Short term ◦ Spread sessions across agents with different
agent_name
values (if applicable) so load balancing can place new sessions onto other replicas faster. ◦ Stagger session startups if possible to avoid simultaneous spikes when many sessions open at once. 1. If you expect sustained heavy sessions ◦ Move to a plan that supports the concurrency you need (Ship supports 20 concurrent sessions; Scale supports up to 600). That will let autoscaling provision enough replicas to handle more concurrent heavy sessions. ◦ Profile which parts of your worker use the most CPU (model inference, encoding, etc.) and consider offloading heavy model work to dedicated inference servers or GPUs if possible. 1. If you want help tuning your setup ◦ Tell me which plan you’re currently on (Build / Ship / other), the average CPU usage per session (if you have it), and which models/tasks cause the spikes (VAD, ASR, TTS, custom model). With that I can suggest whether upgrading plans or changing architecture (e.g., offloading inference) will be the most effective next step. If you’d like, share the plan name and a short profile of what each session runs (models and typical CPU%), and I’ll recommend the most cost-effective plan and scaling approach. Sources: Deploy and scale agents on LiveKit Cloud | An open source stack for real-time multimodal AI | How much can LiveKit scale? | LiveKit | Troubleshooting Latency and Timeout Errors with Turn Detection on AWS