future-stone-69754
07/21/2025, 12:25 PMtall-airline-16756
07/21/2025, 12:25 PMtall-airline-16756
07/21/2025, 12:27 PMlk load-test subcommand that simulates publishers and subscribers in a room, allowing you to test real-world scenarios with both video and audio tracks.
Installation:
• Mac: brew install livekit-cli
• Linux: curl -sSL <https://get.livekit.io/cli> | bash
• Windows: winget install LiveKit.LiveKitCLI
Before running load tests, configure your system:
ulimit -n 65535
sysctl -w fs.file-max=2097152
sysctl -w net.core.somaxconn=65535
sysctl -w net.core.rmem_max=25165824
sysctl -w net.core.wmem_max=25165824
Example load test commands:
• Video publishers: lk load-test --room test-room --video-publishers 8
• Audio publishers: lk load-test --room test-room --audio-publishers 5
• Combined: lk load-test --duration 1m --video-publishers 5 --subscribers 500
Best practices:
• Run the load tester on a cloud VM to avoid local bandwidth constraints.
• Use multiple machines for large-scale tests.
• Monitor the test by joining the room with a generated token.
• For LiveKit Cloud, load testing is limited to 50 publishers/subscribers due to policy restrictions.
The CLI supports advanced options for customizing your test scenario, such as video resolution, simulcast, layout, and speaker simulation. It also provides detailed reporting on track statistics, bitrate, packet loss, and latency.
For agent load testing and egress template testing, additional CLI subcommands are available.
Let me know if you need specific examples or guidance for your use case.
Sources: Custom Recording Template | LiveKit Docs | Benchmarking | LiveKit Docs | autocomplete/fish_autocomplete