Files
Myasnikov Daniil b7fa98cd53 docs(linstor): correct the satellite JVM heap accounting
The satellite exemption was justified with the claim that a container
memory limit shrinks the JVM heap, on the grounds that a container-aware
JVM reads memory.max to size it. That is not what this JVM does.

linstor-server's build.gradle sets jvmSatelliteOpts to "-Xms32M",
"-Xmx2G", "-XX:+CrashOnOutOfMemoryError" and hands it to the generated
Satellite start script via defaultJvmOpts; the controller gets -Xmx8G by
the same route. An explicit -Xmx means the JVM never consults memory.max
for heap sizing, because container awareness only picks a default maximum
when -Xmx is absent. LINSTOR_VERSION in the package Makefile pins which
linstor-server that is, and images/piraeus-server/Dockerfile builds it.

So a limit caps RSS and nothing else, which makes the removed
limits.memory of 2Gi the wrong number rather than merely a tight one:
2Gi is exactly -Xmx2G, leaving nothing for metaspace, thread stacks, code
cache, GC structures and direct buffers, so a satellite growing into its
own heap ceiling would be OOM-killed by the kernel before the JVM got
there. The 4Gi LimitRange default clears the 2G heap with room left for
non-heap rather than "deriving a capped heap", and what a fitted
per-chart limit still needs is a measured peak on a high-resource-count
cluster, not an explicit heap share, which already exists.

Comments only; no rendered output and no assertion changes.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-10-07 05:05:45 +03:00
..