How Dahua and openEuler’s Kmesh‑bwm Cut Latency 50% and Double Container Density
Facing bandwidth contention when high‑volume video analytics compete with online services, Dahua partnered with the openEuler community to replace the tc htb limiter with an eBPF‑based Kmesh‑bwm solution that introduces lock‑free packet scheduling, directional monitoring and multi‑priority bandwidth guarantees, achieving over 50 % latency reduction, more than 50 % increase in container deployment density, and roughly 30 % overall resource savings.
Application Background
Zhejiang Dahua Technology Co., a global video‑centric smart IoT solution provider, runs a container cloud platform that underpins video‑big‑data, intelligent video and city‑level services as well as AI training workloads. The platform must handle diverse cloud‑native loads on heterogeneous hardware while keeping infrastructure efficient.
Business Challenges
In mixed video deployment scenarios, large‑volume and bursty video analysis traffic抢占 (preempt) bandwidth from online services, degrading QoS and raising latency. Container mixed‑deployment further complicates matters: after declaring resource and QoS requirements, containers are scheduled on a shared pool, leading to random placement, limited deployment density, and unstable resource utilization.
Legacy bandwidth control relies on the Linux tc htb scheme, which uses a single queue and incurs global lock contention as traffic grows, making it unsuitable for high‑concurrency workloads.
Solution Overview
Dahua collaborated with the openEuler Kmesh team to redesign the bandwidth management stack. The new Kmesh‑bwm leverages eBPF and the EDT (Earliest‑Departure‑Time) mechanism to perform OS‑level scheduling, replacing the single‑queue htb bottleneck with a lock‑free, timestamp‑driven approach.
Specific Optimizations
Bidirectional bandwidth monitoring : outbound traffic is forwarded through the host NIC, while inbound traffic is redirected to an ifb device, enabling fine‑grained direction‑aware control.
Lock‑free bandwidth preemption : each packet ( skb) receives an earliest‑send timestamp via eBPF; a time‑wheel scheduler replaces the original qdisc queue, eliminating the global lock and reducing queuing delay.
Multi‑priority bandwidth management :
Minimum bandwidth guarantee ensures every Pod receives its required baseline, preventing burst traffic from starving online services.
Three‑level traffic priority directs allocation from high to low.
Surplus bandwidth redistribution allocates any remaining capacity proportionally among pods of the same priority, improving overall utilization.
Customer Value
Deploying Kmesh‑bwm in multi‑video‑stream concurrent workloads yielded concrete gains: latency dropped by more than 50 % with stable variance under load; container deployment density rose by over 50 % (now dependent only on pod count, not on service type); and overall resource utilization improved by roughly 30 %.
Linux Code Review Hub
A professional Linux technology community and learning platform covering the kernel, memory management, process management, file system and I/O, performance tuning, device drivers, virtualization, and cloud computing.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
