Skip to content

Conversation

@bobrik
Copy link
Contributor

@bobrik bobrik commented Jan 18, 2026

This requires Linux v5.6, but it reduces the load significantly for environments where there's a lot of process creation/exit churn.

See: torvalds/linux@0579963

Here's the flamegraph diff of this change deployed where you can see the new batched setup in red quite a bit smaller than the previous per key iteration in green:

image

This requires Linux v5.6, but it reduces the load significantly for
environments where there's a lot of process creation/exit churn.

See: torvalds/linux@0579963

Signed-off-by: Ivan Babrou <github@ivan.computer>
// monitorPIDEventsMap periodically iterates over the eBPF map pid_events,
// collects PIDs and writes them to the keys slice.
func (t *Tracer) monitorPIDEventsMap(keys *[]libpf.PIDTID) {
eventsMap := t.ebpfMaps["pid_events"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @fabled mentioned in #1079 (comment) it would be best, if the batch operations would be implemented in a transparent way, maybe similar we do for lookups, so that the process can fall back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at this later in the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants