RFR: 8257774: G1: Trigger collect when free region count drops below threshold to prevent evacuation failures

Charlie Gracie cgracie at openjdk.java.net
Sun Dec 6 17:45:19 UTC 2020


Bursts of short lived Humongous object allocations can cause GCs to be initiated with 0 free regions. When these GCs happen they take significantly longer to complete. No objects are evacuated so there is a large amount of time spent in reversing self forwarded pointers and the only memory recovered is from the short lived humongous objects. My proposal is to add a check to the slow allocation path which will force a GC to happen if the number of free regions drops below the amount that would be required to complete the GC if it happened at that moment. The threshold will be based on the survival rates from Eden and survivor spaces along with the space required for Tenure space evacuations.

The goal is to resolve the issue with bursts of short lived humongous objects without impacting other workloads negatively. I would appreciate reviews and any feedback that you might have. Thanks.

Here are the links to the threads on the mailing list where I initially discussion the issue and my idea to resolve it:
https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-November/032189.html
https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-December/032677.html

-------------

Commit messages:
 - Improve G1GC accounting for humongous objects

Changes: https://git.openjdk.java.net/jdk/pull/1650/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1650&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257774
  Stats: 129 lines in 7 files changed: 96 ins; 10 del; 23 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1650.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1650/head:pull/1650

PR: https://git.openjdk.java.net/jdk/pull/1650



More information about the hotspot-gc-dev mailing list