Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/heimdall

bench/floor-cost/README.md

floor-cost: what a call costs under the floor

Heimdall is a defensive sandbox. This bench measures the per-call cost of what is built of the graph filter (docs/v2/graph-filter.md §12 step 10, without the follower):

The follower (eBPF) is not built, so its cost (t_follow, t_idle) is not measured.

Method

crates/heimdall-broker/examples/floor_cost.rs, run by measure.sh:

Run it: bench/floor-cost/measure.sh <out dir> (privileged podman, the toolchain image; FLOOR_COST_ARGS, FLOOR_COST_CPU, FLOOR_COST_SUP_CPU).

Results (2026-11-08, oden)

Host: AMD Ryzen Threadripper PRO 3975WX (32 cores, no SMT), kernel 7.0.0-42-generic, clocksource tsc, in a privileged rootless podman container with no seccomp filter of its own. The host was busy: load average 52 to 83 over the run, all 32 CPUs in use by other work, and the bench ran at nice 10. Medians below are from results/2026-11-08-oden/ (run 3); two earlier runs the same day (load 34 to 94) gave the same medians within 10 ns, and for the brokered call within the spread given.

what call BPF insns cache median, no filter median, filtered added p99, filtered
static floor, abcdf getppid (bare allow) 33 yes 100 ns 120 ns +20 ns 150 ns
static floor, abcdf mprotect (argument rule) 48 no 211 ns 271 ns +60 ns 330 ns
static floor, abcdf openat (argument rule) 50 no 1,833 ns 1,953 ns +120 ns 2,395 ns
static floor, wasm host gettid (bare allow) 37 yes 100 ns 120 ns +20 ns 140 ns
static floor, wasm host prctl (argument rule) 59 no 210 ns 271 ns +61 ns 330 ns
static floor, wasm host mprotect (argument rule) 52 no 220 ns 271 ns +51 ns 340 ns
three answers, abcdf mprotect 50 no 211 ns 261 ns +50 ns 330 ns
three answers, wasm host prctl 61 no 210 ns 271 ns +61 ns 331 ns
stacked, wasm host prctl 101 no 210 ns 291 ns +81 ns 301 ns
three answers, abcdf openat, CONTINUE 52 no 1,833 ns 6,292 ns +4.5 µs 1.0 ms
three answers, abcdf openat, broker 52 no 1,833 ns 12,043 ns +10.2 µs 1.5 ms
three answers, wasm host openat, CONTINUE 58 no 1,834 ns 6,542 ns +4.7 µs 1.1 ms
three answers, wasm host openat, broker 58 no 1,834 ns 12,394 ns +10.6 µs 1.0 ms
stacked, wasm host openat, CONTINUE 67 no 1,834 ns 6,372 ns +4.5 µs 122 µs
stacked, wasm host openat, broker 67 no 1,834 ns 9,918 ns +8.1 µs 70 µs

What the numbers say: