TCP Socket Lookup Degradation and per-Netns Ehash
summary
Kernel TCP lookup uses three global hash tables B/L/E and long lists slow lookups so a single noisy tenant can cut TCP throughput. Experiments show throughput ~50 Gbps with a tiny ehash, drops ~10% when list length reaches 64 and falls to ~50% when length exceeds ~300. A per-netns ehash is implemented with sysctls to allocate a private table before creating the namespace, knobs accept sizes (rounded to power of two) and fall back to global on OOM default 0, max 16M. Feature is merged in v6.1.
AI-written summary · about
chapters (6)
- 0:00Introduction and overview
- 0:49Socket management mechanisms
- 9:32Addressing lookup degradation
- 20:47Per-namespace hash tables
- 24:19Tuning and NUMA policy
- 25:22Conclusion and summary
related talks
14mZero-overhead Container Networking with eBPF and Netkit
30mOn Sockets and System Calls: Minimizing Context Switches for the Socket API
17mOpening Up Kernel-Bypass TCP Stacks
35mAll Your Queues Are Belong to Us: The Hunt for a Network Bug...
47mSpeedrun through Splicing Sockets with Sockmap
27mDebugging Linux Issues with eBPF
31mBeware of the kernel RTNL mutex
39mThe Path of the Private FUTEX
