Open jbellmann opened 8 years ago
@jbellmann Hey, can we close this issue?
I think it makes more sense setting it equal to -Xmx so the memory allocation in the OS stays the same during garbage collection. This will
@nmeyer-zalando I think the answer is "it depends", see burstable vs. guaranteed pods on Kubernetes --- some system configurations might benefit from overcommitting and relying on the fact that apps only use a fraction of the heap usually. Some other apps with high traffic and performance characteristics benefit from min==max setting.
Generally the JVM doesn't tend to yield memory back to the OS very easily unless configured to aggressively do so. Oracle usually recommends using -Xms == -Xmx, I agree that it depends but it makes for a sensible default, to be overridden with env vars.
While the 'max heap-size' is set to a higher value than default, the 'initial heap-size' is not and leads to be very low (16M). This can result in OOME during startups. I would say that half of 'max heap-size' would be a good default.