When I self hosting livekit agent, I am in 2gb cpu...
# ask-ai
b
When I self hosting livekit agent, I am in 2gb cpu cores and 8gb ram, the livekit agent only can support on 4-5 person at the same time only. Is this normal?
t
Thanks for reaching out, Terence. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Based on LiveKit's recommendations, a machine with 4 cores and 8GB of memory should typically support up to 25 concurrent user sessions for most voice-to-voice applications. However, the actual capacity can vary depending on the specific features and configurations of your LiveKit agent. For example, if your agent is using resource-intensive features like enhanced noise cancellation, it will require more CPU and memory per session, which could explain why you're only able to support 4-5 users at the same time on your current setup. If you're consistently seeing lower capacity than expected, you may want to: • Review the specific features and plugins your agent is using to identify any resource-intensive processes. • Consider upgrading your hardware to meet the demands of your specific use case. • Run performance tests to better understand the resource usage of your implementation. Let me know if you need further assistance with optimizing your setup or understanding resource requirements.
b
How to run load test?
t
Hey there! Want to run a performance check on your LiveKit agent? I've got a super handy way to do that using the LiveKit CLI's load testing utility. It's easier than you might think! Using the Agent Load Test Command The LiveKit CLI has this awesome
agent-load-test
command that makes performance testing a breeze. Basic Command Structure
Copy code
lk perf agent-load-test \
  --rooms 5 \
  --agent-name test-agent \
  --echo-speech-delay 10s \
  --duration 5m
Available Parameters • `--rooms`: How many rooms you want to create for testing (think of it like setting up multiple conversation spaces) • `--agent-name`: The name of your awesome agent that'll be joining these rooms • `--echo-speech-delay`: A cool setting that mimics natural conversation timing (like how long it takes someone to respond) • `--duration`: How long you want the test to run - totally flexible! How the Load Test Works Here's the fun part - it's like creating a mini simulation where: • Your agent gets dispatched to multiple rooms • Echo participants simulate real conversations • You can tweak the speech timing to feel super natural • Performance metrics get collected so you can see exactly how your agent is doing Prerequisites Just a quick checklist before you dive in: • Make sure your agent is running with
start
(not
dev
) • Have your agent ready with a friendly greeting to kick things off Alternative: Agent-to-Agent Testing Want to level up your testing? Agent-to-agent testing is like having robot teammates evaluate each other! This means you can: • Run tests without needing human testers • Create super specific test scenarios • Get totally objective evaluations • Generate comprehensive test reports Need any help walking through this? I'm totally here for you - just give me a shout! Sources: Deploying to production | LiveKit Docs | autocomplete/fish_autocomplete | Agent Testing & Evaluation | livekit/livekit_composite | DeepWiki