-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: hotspot
-
b27
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-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
-
- clones
-
JDK-8371986 Remove the default value of InitialRAMPercentage
-
- Closed
-
- csr for
-
JDK-8371987 Remove the default value of InitialRAMPercentage
-
- Closed
-
- relates to
-
JDK-8373102 com/sun/jdi/MethodInvokeWithTraceOnTest.java can fail with ObjectCollectedException when run with a small heap
-
- In Progress
-
-
JDK-8369105 G1: JDK-8348278: Trim InitialRAMPercentage caused a performance regression in Crypto-KeyPair benchmarks
-
- Closed
-
-
JDK-8369106 G1: JDK-8348278: Trim InitialRAMPercentage caused a performance regression in DaCapo-fop-default
-
- Closed
-
-
JDK-8368974 G1: JDK-8348278: Trim InitialRAMPercentage caused a performance regression in Renaissance-FjKmeans
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/6abf7b6f
-
Commit(master)
openjdk/jdk/8d80778e
-
Review(master)
openjdk/jdk/28530
-
Review(master)
openjdk/jdk/28641