Perfect locality and three epic SystemTap scripts
Nov 7, 2017Marek Majkowski

Summary
This post delves into the optimization of network packet processing at the kernel level, specifically exploring the REUSEPORT socket option and its evolution with SO_INCOMING_CPU and SO_ATTACH_REUSEPORT_CBPF. It demonstrates how these features can improve packet locality by ensuring packets are processed on the same CPU that received them, thereby enhancing CPU cache locality and reducing cross-CPU interrupts. The post also introduces three advanced SystemTap scripts to measure and verify these improvements, though it notes that direct end-to-end performance gains for high-level TCP applications were not significantly measurable.
More from the Data Infrastructure & Analytics trail
- Introducing Cloudflare Basin: an open, serverless data platform, now generally available
- Introducing the Billable Usage API: programmatic cost visibility for Cloudflare
- Announcing the Monetization Gateway: charge for any resource behind Cloudflare via x402
- How we built Cloudflare's data platform and an AI agent on top of it
- Iran's Internet is partially restored, Cloudflare Radar data shows