memory of a public node with 1000 connections: measured, GOMEMLIMIT in the manifest

cmd/allmende-conns opens many small libp2p clients to one node. A real --public node: 35 MB idle, 131 MB with 1000 connections, 156 MB at the peak with 100 listings flooded to all of them; the limit refused the 1001st. The StatefulSet sets GOMEMLIMIT=400MiB under its 512Mi limit as a safety net.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-19 00:58:45 +01:00
co-authored by Claude Sonnet 5.5
parent 59973cbf43
commit 6e37a2c654
4 changed files with 138 additions and 6 deletions
+5
View File
@@ -73,6 +73,11 @@ spec:
env:
- name: ALLMENDE_DATA
value: /data
# A soft limit below the container's 512Mi: the Go runtime then
# collects harder as it nears this, instead of growing until the
# kernel kills the pod. 1000 connections measured about 160 MB.
- name: GOMEMLIMIT
value: 400MiB
ports:
- name: p2p-tcp
containerPort: 4001