Skip to content
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

pkg/sensors: reduce memory footprint of unused override_tasks maps #2692

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

mtardy
Copy link
Member

@mtardy mtardy commented Jul 18, 2024

Some of the plumbing was already present. We now pin the map correctly.

Reduce the kernel memory footprint (accounted by the cgroup v2 memory controller) of the override feature when unused (around ~3MB per kprobe).

@mtardy mtardy added release-note/bug This PR fixes an issue in a previous release of Tetragon. needs-backport/1.0 This PR needs backporting to 1.0 needs-backport/1.1 This PR needs backporting to 1.1 labels Jul 18, 2024
@mtardy mtardy requested a review from olsajiri July 18, 2024 16:36
@mtardy mtardy requested a review from a team as a code owner July 18, 2024 16:36
@mtardy
Copy link
Member Author

mtardy commented Jul 18, 2024

I could update the test added here d63d828.

Copy link

netlify bot commented Jul 19, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 8a93157
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/669a4aa28e31b10008e4973a
😎 Deploy Preview https://deploy-preview-2692--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mtardy mtardy force-pushed the pr/mtardy/override-memory branch from d01f6b4 to b7a046d Compare July 19, 2024 09:07
It can be confusing that only the per policy maps are configured here.
Noting that the per kprobe setup is done elsewhere.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Resize the override_tasks if needed to save memory, thus we are saving
~3MB of kernel memory by kprobe that are not using the override action.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
@mtardy mtardy force-pushed the pr/mtardy/override-memory branch from b7a046d to 8a93157 Compare July 19, 2024 11:14
@mtardy mtardy merged commit 659704f into main Jul 19, 2024
48 checks passed
@mtardy mtardy deleted the pr/mtardy/override-memory branch July 19, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-backport/1.0 This PR needs backporting to 1.0 needs-backport/1.1 This PR needs backporting to 1.1 release-note/bug This PR fixes an issue in a previous release of Tetragon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants