In java, you have min heap space (-Xms
) and max heap space (-Xmx
). Min heap space is allocated to the JVM from start, "max heap space" is the limit where the JVM will say "out of heap space" when reaching it.
Are there such different values (initial and limit) for a pod in Openshift/Kubernetes, or initial memory allocation is always equal to limit for some reason?
In Kubernetes, the mechanisms for controlling resources such as CPU and memory are
requests
andlimits
.In case you don't specify your CPU limit:
In situation that you specified a CPU limit but CPU request is not specified Kubernetes automatically assigns a CPU request that matches the limit.
To learn more see this documentation and this article.