8238686: G1 may waste lots of space or fail to uncommit when observing MinHeapFreeRatio during sizing after full gc#29137
Conversation
|
👋 Welcome back iwalulya! A progress list of the required criteria for merging this PR into |
|
@walulyai This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 70 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
Split the changes because the change in flag defaults needs to have a compatibility review. |
|
/csr needed |
|
@tschatzl has indicated that a compatibility and specification (CSR) request is needed for this pull request. @walulyai please create a CSR request for issue JDK-8238686 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
|
Going to push as commit b134030.
Your commit was automatically rebased without conflicts. |
Hi,
Please review this change which modifies the defaults for the
MinHeapFreeRatioandMaxHeapFreeRatioflags in G1 so that they do not affect heap sizing unless explicitly set by the user.Previously, these flags could trigger heap resizing at the end of Full GC, potentially overriding the G1 ergonomic heap sizing heuristics, which may be unexpected for the user. In particular, for workloads that frequently invoke
System.gc(), the heap could shrink at the end of the Full GC and then expand aggressively during subsequent GCs (see image below).With this update, the default values for
MinHeapFreeRatioandMaxHeapFreeRationo longer affect heap resizing. These flags will only take effect when explicitly set by the user..Additionally, pause times from user-triggeredSystem.gc()invocations will be excluded from the data used to update heap sizing heuristics. Because these GCs are user-initiated and do not reflect actual GC pressure, including their pause times can skew GC Pause Time ratios used for heap sizing decisions.Testing: Tier 1 and JavaPerf.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29137/head:pull/29137$ git checkout pull/29137Update a local copy of the PR:
$ git checkout pull/29137$ git pull https://git.openjdk.org/jdk.git pull/29137/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29137View PR using the GUI difftool:
$ git pr show -t 29137Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29137.diff
Using Webrev
Link to Webrev Comment