linstor-server bakes `-Xms256M -Xmx8G -XX:+CrashOnOutOfMemoryError` into
the generated bin/Controller (build.gradle, jvmControllerOpts), nothing in
this chart or in piraeus-entry.sh overrides it, and a JVM handed an
explicit -Xmx never reads memory.max. The container was deliberately left
with a 700Mi request and no limit at all, which was the safe choice while
nothing else supplied one.
It stops being safe alongside the system-namespace LimitRange: a container
declaring no memory limit is given the configured default, 4Gi, so the
process's own heap ceiling would sit at twice its cgroup ceiling and a
large enough DRBD resource count would have the kernel kill the storage
control plane where the JVM would otherwise have crashed itself loudly at
8G. Stating the limit here is also what keeps the container out of the
LimitRange's reach, since a container with its own limit is never
defaulted one.
10Gi is the 8G heap plus room for metaspace, code cache, thread stacks and
direct buffers. CPU stays unlimited. The helm-unittest assertion that
pinned "no limits" is replaced by one pinning the memory limit and the
absence of a CPU limit, so neither lowering it below the heap ceiling nor
dropping it again passes silently.
Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>