Below you will find pages that utilize the taxonomy term “Java”
Kubernetes Resource Limits and JVM Heap Size
By default, the JVM’s maximum heap size is 1/4 of the physical memory available - you can read about this in the Oracle GC tuning guide. This means that if you don’t define -Xmx in your JVM parameters, the container will set 1/4 of the host memory as the maximum heap size.
On a recent enough JVM (8u191+ and 10+), the JVM is container-aware: if you set a Kubernetes resource limit, the JVM uses that limit rather than the host’s memory to size the heap. So your maximum heap size becomes 1/4 of your Kubernetes resource limit.