-
Enhancement
-
Resolution: Unresolved
-
P4
-
15
This issue tracks the integration of `SoftMaxHeapSize` as a guiding input for heap sizing and marking heuristics in G1.
It includes:
- Introduction of soft_max_capacity() in G1CollectedHeap
- Wiring into heap resizing policy and IHOP logic
- Maintaining compatibility with MinHeapSize and other GC tunables
This work is based on Thomas Schatzl's original patch and follow-up contributions by Man Cao (Google). The `SoftMaxHeapSize` flag provides a soft limit for committed heap memory, which G1 GC will attempt to stay below, when possible, without treating it as a hard cap.
Broader work related to a dynamic, multi-input AHS (Automatic Heap Sizing) mechanism — including responsiveness to external memory pressure, GCTimeRatio adaptation, and environmental constraints — is being tracked separately.
See also:
- [mailing list discussion: November 2024 summary] (https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-November/050214.html)
- [mailing list: March 2025 update] (https://mail.openjdk.org/pipermail/hotspot-gc-dev/2025-March/051619.html)
- [PR: Initial integration of SoftMaxHeapSize](https://github.com/openjdk/jdk/pull/24211)
It includes:
- Introduction of soft_max_capacity() in G1CollectedHeap
- Wiring into heap resizing policy and IHOP logic
- Maintaining compatibility with MinHeapSize and other GC tunables
This work is based on Thomas Schatzl's original patch and follow-up contributions by Man Cao (Google). The `SoftMaxHeapSize` flag provides a soft limit for committed heap memory, which G1 GC will attempt to stay below, when possible, without treating it as a hard cap.
Broader work related to a dynamic, multi-input AHS (Automatic Heap Sizing) mechanism — including responsiveness to external memory pressure, GCTimeRatio adaptation, and environmental constraints — is being tracked separately.
See also:
- [mailing list discussion: November 2024 summary] (https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-November/050214.html)
- [mailing list: March 2025 update] (https://mail.openjdk.org/pipermail/hotspot-gc-dev/2025-March/051619.html)
- [PR: Initial integration of SoftMaxHeapSize](https://github.com/openjdk/jdk/pull/24211)
- relates to
-
JDK-8352765 G1CollectedHeap::expand_and_allocate() may fail to allocate even after heap expansion succeeds
-
- Resolved
-
-
JDK-8349978 G1: Reconsider G1 GCTimeRatio boosting during heap expansion for small heaps
-
- Open
-
-
JDK-8222145 Add -XX:SoftMaxHeapSize flag
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/24211