bpf-examples
bpf-examples copied to clipboard
trie-free-latency: Demo showing the latency of freeing LPM_TRIE maps
The performance of freeing LPM_TRIE maps suffers heavily for maps with a large number of entries. Here's a little demo that measures the duration of trie_free() and allows the user to control how many entries are in the map, as well as how many iterations of the demo are run to collect latency statistics.
This is a reproduction of an issue we've seen at Cloudflare and a public demo to aid with the upstream discussion at https://lore.kernel.org/lkml/[email protected]/
Thanks for working on this "homework" assignment ;-)
I'm considering if we should rename the example director trie-free-latency
- to something with
LPMin the name, to make the connection with theBPF_MAP_TYPE_LPM_TRIE
What about these proposals:
LPM-map-testsorLPM-map-bench
I'm considering adding another example in this directory that can monitor the runtime performance/latency of LPM map lookups
- I already have a
bpftracescript, that measures lookup latency, but it added too much overhead (to production) - Thus, I want to write a C/BPF version with minimal overhead
Thanks for addressing everything - going to merge