It is important to emphasize that selecting a default value for `InitialRAMPercentage` fundamentally involves a trade-off between startup and runtime performance. A larger initial heap size grants the GC more headroom initially, potentially reducing early GC cycles and resizing events. In contrast, a smaller initial heap can result in more GC activity and resizing as the heap fills up and adjusts to demand at runtime. However, it is extremely challenging to pick a single numeric default that suits the needs of most applications, given their diversity. Therefore, we propose to always choose the minimum possible initial heap size, as this consistently optimizes for startup performance. For users more concerned with runtime performance than startup, they are always able to explicitly configure `-Xms` or `InitialRAMPercentage` to meet their requirements.
By making this the default behavior, we effectively remove opaque GC heuristics and provide a consistent, predictable starting point that is easy to understand and reason about. If the user hasn't specified their preferences, we optimize for what can be objectively beneficial, faster startup, while allowing users to tune for other needs as appropriate.
From a performance perspective, minimizing the initial heap size leads to faster startup, as targeted by
- causes
-
JDK-8373712 Regressions in 26+27 after JDK-8371986: Remove the default value of InitialRAMPercentage
-
- Open
-
-
JDK-8372961 [BACKOUT] Remove the default value of InitialRAMPercentage
-
- Resolved
-
-
JDK-8372956 java/lang/management/MemoryPoolMXBean/ThresholdTest.java failing with InternalError: Memory Pool not found
-
- Closed
-
- csr for
-
JDK-8371987 Remove the default value of InitialRAMPercentage
-
- Closed
-
- is cloned by
-
JDK-8373023 [REDO] Remove the default value of InitialRAMPercentage
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/6abf7b6f
-
Review(master)
openjdk/jdk/28530