Skip to content

Introduce own perf buffer for important events #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

patrickpichler
Copy link
Contributor

There is now a second perf buffer for so called "control plane" events.
This means that the chances of them being dropped should be
significantly lower. The reason for this change is, that events such as
cgroup rmdir will trigger the cleanup of cgroup related caches.

Additionally we now leverage the path found in the cgroup mkdir event
to prepopulate a cache in the cgroup client, which means that the costly
filesystem scan to figure out the path of a cgroup should be triggered
far less often.

With the handling of cgroup rmdir event out of sync with the rest of
the events from ebpf, the cgroup related cleanup logic has also been
changed. Instead of performing the cleanup straight away, it is delayed
by a minute. This should give the rest of the system enough time to
handle any events still targeted at the removed cgroup.

@patrickpichler patrickpichler requested a review from anjmao March 25, 2024 15:13
@patrickpichler patrickpichler force-pushed the feature/add-perf-buffer-for-important-events branch from 309ddcd to c424e08 Compare March 26, 2024 13:31
@patrickpichler patrickpichler force-pushed the feature/add-perf-buffer-for-important-events branch from 91bac34 to bb24586 Compare March 27, 2024 07:28
There is now a second perf buffer for so called "control plane" events.
This means that the chances of them being dropped should be
significantly lower. The reason for this change is, that events such as
`cgroup rmdir` will trigger the cleanup of cgroup related caches.

Additionally we now leverage the path found in the `cgroup mkdir` event
to prepopulate a cache in the cgroup client, which means that the costly
filesystem scan to figure out the path of a cgroup should be triggered
far less often.

With the handling of `cgroup rmdir` event out of sync with the rest of
the events from ebpf, the cgroup related cleanup logic has also been
changed. Instead of performing the cleanup straight away, it is delayed
by a minute. This should give the rest of the system enough time to
handle any events still targeted at the removed cgroup.
@patrickpichler patrickpichler force-pushed the feature/add-perf-buffer-for-important-events branch from bb24586 to ea986ea Compare March 27, 2024 08:10
@patrickpichler patrickpichler merged commit 197b616 into main Mar 27, 2024
2 checks passed
@patrickpichler patrickpichler deleted the feature/add-perf-buffer-for-important-events branch March 27, 2024 10:00
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