Real-World Performance Benchmarks & Load Test Results
The following benchmark results are derived from standardized automated load testing (bench-results/bench-baseline.md) conducted under sustained production stress.
1. High-Density Baseline Stress Benchmark
Test Server Specification: 12 CPU Cores, 32 GB RAM, Linux Ubuntu 24.04 LTS (Kernel 6.8), 10GbE Network Interface.
Load Configuration:
- Synthetic Cameras:
600streams @ 30 FPS (~2.5 Mbps each) - HLS fMP4 Viewers:
1,800concurrent clients continuously fetching playlists and video segments - WebRTC WHEP Clients:
240active WebRTC sessions receiving RTP video - REST API Workers:
10parallel workers querying authenticated API routes - gRPC AI Workers:
20bidirectional frame and metadata streaming workers - Test Duration:
1,800 seconds(30 minutes continuous stress)
Empirical Benchmark Measurements:
| Subsystem Component | Key Metric | Measured Value | Latency (p50 / p95 / p99) |
|---|---|---|---|
| Ingest (RTSP/NALU) | Total Ingest Throughput | 18,139 FPS (1,339.9 Mbps) | Frame Drops: 0 |
| REST API | Throughput / RPS | 375 RPS (675,739 requests, 0 err) | 0.63 ms / 18.94 ms / 96.81 ms |
| HLS fMP4 Delivery | Egress Throughput | 1,098,000 segments (500.2 MB/s) | 50.10 ms / 277.06 ms / 495.25 ms |
| WebRTC WHEP | Handshake & RTP Video | 51,793 RTP pkts | Handshake: 140 – 180 ms (Non-Trickle) |
| gRPC Stream & AI | Frame Egress & Metadata Ingress | 18,136 FPS / 1,900 RPS | Stream Latency: 32.39 ms (0 err) |
| EventBus Webhooks | Published / Delivered / Dropped | 582,476 / 582,476 / 0 (0.0%) | Circuit Breaker: Clean |
System Resource Footprint (Under 600 Cameras + 2,040 Viewers):
| System Resource | Measured Value |
|---|---|
| Active Goroutines | 2,448 |
| Heap Alloc / In-Use | 140 MB / 174 MB |
| System Memory (Sys) | 2,224 MB |
| Process RSS Memory | 471 MB |
| Process CPU Usage | 360.8% (~3.6 CPU cores out of 12) |
| OS Network Bandwidth | 5,834.2 Mbps RX / 36.8 Mbps TX |
| GC Max Pause | 24.98 ms |
2. Latency Benchmarks (Glass-to-Glass)
Measuring the time elapsed between physical real-world camera motion and pixel rendering in a web browser:
- WebRTC (WHEP): 250 – 350 ms end-to-end glass-to-glass latency.
- Low-Latency HLS: 1.5 – 2.5 s end-to-end latency.
3. Engineering Insights from Load Testing
- WebRTC WHEP Handshake: In browsers supporting Trickle ICE, video starts in
< 50 ms. All connections multiplex over port8555/UDP. - HLS Steady-State Polling: Once the first segment is generated, subsequent playlist polling across hundreds of concurrent viewers resolves from in-memory ring cache with latency
p50 < 0.5 msand zero allocations. - Linux Page Cache Immunity: Sustained 24/7 video archiving leaves OS Page Cache clean due to
POSIX_FADV_DONTNEEDchunk evictions.