Skip to content

Commit 4d53c90

Browse files
martin-matclaude
andauthored
fix(helm): size the eBPF maps for the chart's default memory limit (#673)
Signed-off-by: Martin Matyas <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
1 parent d97c200 commit 4d53c90

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎.deploy/helm/eupf/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ env:
6767

6868
List-valued parameters (e.g. `UPF_INTERFACE_NAME`) are comma-separated strings.
6969

70+
### Sessions and memory
71+
72+
eUPF sizes its eBPF maps from `max_sessions`: two PDR, FAR and URR entries and one QER entry per session, allocated at startup and charged to the pod's memory. eUPF's own default is 65535 sessions, whose maps need about 115 MiB (a working set of about 140 MiB with the process, measured on a kind cluster); the chart's default memory limit is 128 Mi, so `defaultEnv` sets `UPF_MAX_SESSIONS: "1024"`, a working set of about 30 MiB. For production, raise `max_sessions` and `resources.limits.memory` together: about 1.8 MiB per 1024 sessions on top of the process's ~30 MiB, plus headroom; in ConfigMap mode set `max_sessions` in `config.data`, because the default `UPF_*` variables are not injected there.
73+
7074
### ConfigMap mode (`config.enabled: true`)
7175

7276
```yaml

‎.deploy/helm/eupf/values.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ fullnameOverride: ""
5454
# values file; eUPF also falls back to built-in defaults for anything unset.
5555
defaultEnv:
5656
UPF_INTERFACE_NAME: eth0
57+
# The eBPF maps are sized from max_sessions (two PDR, FAR and URR entries
58+
# and one QER entry per session). eUPF's own default is 65535 sessions, whose
59+
# maps need more memory than the chart's default limit below; 1024 keeps the
60+
# maps at the size the limit was set for. Raise both together for production.
61+
UPF_MAX_SESSIONS: "1024"
5762
UPF_API_ADDRESS: ":8080"
5863
UPF_PFCP_ADDRESS: ":8805"
5964
UPF_METRICS_ADDRESS: ":9090"

0 commit comments

Comments
 (0)