Repository navigation
fix(helm): size the eBPF maps for the chart's default memory limit - #673
Merged
Merged
Conversation
pirog-spb
approved these changes
Oct 21, 2026
pirog-spb
force-pushed
the
chart-max-sessions
branch
from
October 22, 2026 10:48
a9c2962 to
1ce9abe
Compare
Since edgecomllc#622 an unset map size is derived from max_sessions, whose default is 65535: PDR, FAR and URR maps of 131,070 entries and a QER map of 65,535. Those maps are allocated at startup and charged to the pod, about 115 MiB, a working set of about 140 MiB with the process. The chart's default memory limit is 128 Mi, set for the 1024-entry maps of the 0.7.1 image, so an image built from main fails at startup with the chart's defaults: "creating map: map create: cannot allocate memory". The chart now sets UPF_MAX_SESSIONS to 1024 in defaultEnv, which keeps the maps at the size the limit was set for (a working set of about 30 MiB), and the README says how max_sessions and the memory limit scale together: about 1.8 MiB per 1024 sessions on top of the process's ~30 MiB. In ConfigMap mode max_sessions goes into config.data, since the default variables are not injected there. Measured on a kind cluster with the kubelet's accounting: main's defaults start under 192 Mi and above, not under 128 Mi; with UPF_MAX_SESSIONS=1024 the pod starts under 128 Mi and passes the same tests as 0.7.1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Martin Matyas <martin.matyas@tieto.com>
pirog-spb
force-pushed
the
chart-max-sessions
branch
from
October 22, 2026 11:45
1ce9abe to
1003149
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #670.
Since #622 an unset map size is derived from
max_sessions, whose default is 65535: PDR, FAR and URR maps of 131,070 entries and a QER map of 65,535, allocated at startup and charged to the pod, about 115 MiB (a working set of about 140 MiB with the process). The chart's default memory limit is 128 Mi, set for the 1024-entry maps of the 0.7.1 image, so an image built frommainfails at startup with the chart's defaults:creating map: map create: cannot allocate memory.Change
values.yaml:UPF_MAX_SESSIONS: "1024"indefaultEnv, which keeps the maps at the size the limit was set for (a working set of about 30 MiB), with the reasoning in the comment.max_sessionsandresources.limits.memoryscale together (about 1.8 MiB per 1024 sessions on top of the process's ~30 MiB), and that in ConfigMap modemax_sessionsgoes intoconfig.data, since the default variables are not injected there.This is option 1 of #670; raising the default limit to carry 65535 sessions (option 2) is the alternative, if that capacity is meant to be the chart's default.
Verification
Measured with the kubelet's accounting on a kind cluster (run 38941479851):
main's defaults need a working set of ~140 MiB and start under 192 Mi and above, not under 128 Mi; withUPF_MAX_SESSIONS=1024the working set is ~30 MiB. With this change and the chart's defaults, an image built frommainstarts and passes the CNTi essential tests like 0.7.1, 15 of 19 (run 38942371982).#672 also bumps the chart to 0.7.2; whichever merges second needs a one-line rebase.
🤖 Generated with Claude Code