The Perils of Excessive Heap Allocation: Too Large

An overly large heap (-Xmx) can paradoxically degrade performance by causing longer "stop-the-world" garbage collection pauses, increased memory fragmentation, and poor CPU cache utilization, especially if it exceeds physical memory.

Sources

Open the full topic