Measured overhead
benchmarks/run.sh in the repository times the traced system calls with and without the agent. One run of each probe set on Linux 7.0.14, arm64, 12 CPUs, inside the Docker Desktop VM, in nanoseconds per call:
These are measurements of one machine with the exporters off, with run-to-run noise of several percent (the
sendfile rows differ by less than that). They are not guarantees. The CPU figure is the mean of twenty one-second samples that ranged from 0.05% to 0.19%, in a VM whose own services keep sending. The kprobe figures come from forcing that set on a kernel that does not need it; kprobes on the kernels that do may cost more.
Besides the agent’s own memory, the kernel holds the BPF maps: roughly 10 MB at the default sizes, and about 8 MB more for the kprobe set’s socket table.
Where the cost goes
High-frequency data never becomes one event per system call. Byte counts accumulate in a kernel hash map keyed by socket, process and file; every 250 ms the agent swaps that map for an empty one and reads the idle one. Only process and socket lifecycle events travel through the ring buffer, so a traced send or read updates a counter instead of producing an event for the agent to process.Measure on your machine
stats shows the events received and dropped, the agent’s CPU and memory, the size and peak utilization of the event queue, and how full each table is:
process_cpu_time_seconds_total, process_memory_usage_bytes and filetrace_events_dropped_total track the same over time.
Size the agent
Larger tables cost memory in the agent and, for the kernel tables, in BPF maps. Restart the agent after changing the configuration.
Reduce the cost
- Minimal mode.
mode = "minimal"records processes, sockets and network byte counts only, without file identity or attribution. It uses about half the memory of standard mode in the measurement above. - Turn off what you do not need.
[network] tcp,udp,ipv4andipv6, and[file] track_readandtrack_sendfile, each switch a part of collection off. - Exclude noise.
[filters] exclude_processesandexclude_pathsleave processes and paths out, for exampleexclude_processes = ["filetrace-agent"]to leave out the agent’s own traffic to an exporter.