-
Notifications
You must be signed in to change notification settings - Fork 184
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
fix(pkg/bpf): Use channel to process events #1671
fix(pkg/bpf): Use channel to process events #1671
Conversation
Processing events in the same goroutine as the ring buffer reader requires acquiring a mutex, which blocks ringbuf event processing causing a backlog. To avoid this, send events via a buffered channel to a dedicated event processing goroutine to ensure that the ringbuf remains unblocked. This has decreased CPU load from 1-3% on my machine to 0-1% CPU load. Signed-off-by: Dave Tucker <[email protected]>
🤖 SeineSailor Here's a concise summary of the pull request changes: Summary: The pull request "fix(pkg/bpf): Use channel to process events" introduces a significant change to the event handling mechanism in the
Impact: This change affects the package's external interface, requiring integrators to call Observations/Suggestions:
|
let's merge this so we run this on the CI |
…uting-io#1671)" This reverts commit c99e399. Signed-off-by: Dave Tucker <[email protected]>
…uting-io#1671)" This reverts commit c99e399. Signed-off-by: Dave Tucker <[email protected]>
…#1671) Processing events in the same goroutine as the ring buffer reader requires acquiring a mutex, which blocks ringbuf event processing causing a backlog. To avoid this, send events via a buffered channel to a dedicated event processing goroutine to ensure that the ringbuf remains unblocked. This has decreased CPU load from 1-3% on my machine to 0-1% CPU load. Signed-off-by: Dave Tucker <[email protected]>
Processing events in the same goroutine as the ring buffer reader requires acquiring a mutex, which blocks ringbuf event processing causing a backlog. To avoid this, send events via a buffered channel to a dedicated event processing goroutine to ensure that the ringbuf remains unblocked. This has decreased CPU load from 1-3% on my machine to 0-1% CPU load.
Additionally adds some metrics to track events read, events processed and the current depth of the events channel.
Updates: #1670, #1660