Moving Forward with AHS for G1
Monica Beckwith
Monica.Beckwith at microsoft.com
Fri Mar 21 00:19:29 UTC 2025
Hi all,
Following up on the previous discussions around Automatic Heap Sizing (AHS) for G1, I wanted to summarize the key takeaways and outline the next steps.
In my November message [1], I described how AHS could dynamically manage heap sizing based on multiple inputs, including global memory pressure, GCTimeRatio policy, and user-defined heap tunables. This aligns with Thomas’s summary [2], which outlines how AHS integrates with G1’s existing mechanisms, including CPU-based heap resizing (JDK-8238687) [3], external constraints like CurrentMaxHeapSize (JDK-8204088) [4], and SoftMaxHeapSize (JDK-8236073) [5] as a key influence on heap adjustments.
AHS will operate as a broader mechanism, where SoftMaxHeapSize serves as a heuristic to guide memory management but does not impose strict limits. It will work in conjunction with CPU-based heuristics to manage heap growth and contraction efficiently.
Google’s previous work on ProposedHeapSize for G1 contributed valuable insights into adaptive heap management, but as discussions evolved, the consensus has shifted toward a model centered on SoftMaxHeapSize as a guiding input within AHS.
Given this consensus, I will proceed with the implementation of JDK-8236073 [5] to ensure that AHS integrates effectively with G1’s dynamic heap sizing policies.
I will share updates as the work progresses. If there are any additional concerns or areas where further clarification is needed, please let me know.
Thanks again for the valuable discussions.
Best,
Monica
________________________________
References
[1] Monica Beckwith, "Clarifications on AHS behavior and its role in G1," OpenJDK hotspot-gc-dev mailing list, November 2024. [<https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-November/050191.html>https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-November/050191.html]<https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-November/XXXXXX.html]>
[2] Thomas Schatzl, "Giving a rough summary about the system envisioned for G1," OpenJDK hotspot-gc-dev mailing list, February 2025. [https://mail.openjdk.org/pipermail/hotspot-gc-dev/2025-February/051069.html]
[3] OpenJDK Issue, "JDK-8238687: Improve CPU-based heap sizing in G1," OpenJDK Bug Database. [https://bugs.openjdk.org/browse/JDK-8238687]
[4] OpenJDK Issue, "JDK-8204088: Introduce CurrentMaxHeapSize to allow external heap constraints," OpenJDK Bug Database. [https://bugs.openjdk.org/browse/JDK-8204088]
[5] OpenJDK Issue, "JDK-8236073: Introduce SoftMaxHeapSize as a guide for G1 AHS," OpenJDK Bug Database. [https://bugs.openjdk.org/browse/JDK-8236073]
[cid:3d91bfcf-1aee-4667-9392-844632521ddf]<https://outlook.office.com/bookwithme/user/6dc2f1f46dfd446aa456d1c1245cecd6@microsoft.com?anonymous&ep=bwmEmailSignature>
Book time to meet with me<https://outlook.office.com/bookwithme/user/6dc2f1f46dfd446aa456d1c1245cecd6@microsoft.com?anonymous&ep=bwmEmailSignature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20250321/d3f227ab/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-oy3qsdus.png
Type: image/png
Size: 528 bytes
Desc: Outlook-oy3qsdus.png
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20250321/d3f227ab/Outlook-oy3qsdus.png>
More information about the hotspot-gc-dev
mailing list