CyberSIXT Search
Original
Image: Cloudflare

CloudflareMatt Fleming

A deep dive into BPF LPM trie performance and optimization

A Cloudflare post from 21 October 2025 dives into the performance and optimisation of BPF LPM trie maps, highlighting how critical these structures are for IP and IP+Port matching in routing network traffic. In tests on AMD EPYC 9684X 96‑Core machines, a 10K-entry trie with a 32‑bit prefix length and an entry for every key in 0 to 10K shows lookup at 7.423M ops/s and latency of 134.710 ns/op, with updates at 2.643M ops/s and deletes at 0.712M ops/s; freeing a 10K‑entry trie takes 0.573K ops/s and 1.743 ms/op.

The article notes bottlenecks such as entry lookup times in production reaching hundreds of milliseconds and maps taking over 10 seconds to free, occasionally producing soft lockup messages and even traffic packet loss for some customers. It explains that the current kernel implementation is a two‑child trie, which can degrade when data is densely populated, and that level compression is not implemented for BPF LPM tries.

The authors have contributed benchmarks upstream and plan to refactor the Linux kernel’s fib_trie.c to a common Level Compressed trie implementation for future performance gains. They also point to ongoing performance numbers and invite readers to review additional benchmarks, while signalling that improvement of the lookup function is a priority for their workloads.

Sources

On this device

Following

Intel

VendorsThreat actorsResearch reports

Settings

CyberSIXT summarises security news every 30 minutes.

↑↓ move↵ open⌘C copy CVE IDEsc close

Keyboard shortcuts

Everything works with a mouse or touch. Shortcuts are a faster path.

Search ⌘K
Search /
Next item J
Previous item K
Go to Today GT
Go to News GN
Go to CVEs GC
Go to Briefing GB
Reduce motion on this device