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

Stefan Johansson sjohanss at openjdk.java.net
Fri Jun 4 09:42:01 UTC 2021


On Fri, 4 Jun 2021 04:11:34 GMT, Kirk Pepperdine <kirk at kodewerk.com> wrote:

> Traditionally in the logs you would see that the current collection is ?closed out? and a new record is started for the ?new? full collection.
> 
This will still be the case, saying that the young collection is upgraded is a bit misleading (but it is called that in the code). What we are discussing is to add a new specific cause used by the Full GCs. Right now you get:

[13,276s][info][gc             ] GC(71) Pause Young (Normal) (G1 Evacuation Pause) 3096M->3096M(3100M) 1,159ms
[13,644s][info][gc             ] GC(72) Pause Full (G1 Evacuation Pause) 3096M->3096M(3100M) 368,157ms

With this change you would get:

[11,254s][info][gc             ] GC(98) Pause Young (Normal) (G1 Preventive Collection) 3094M->3096M(3100M) 4,513ms
[11,624s][info][gc             ] GC(99) Pause Full (G1 Preventive Collection) 3096M->3093M(3100M) 369,918ms

Which looks more strange because the Full GC is not preventive. So the idea is to add a separate cause used by any Full GC triggered by a young collection not generating enough free memory, like this:

[18,454s][info][gc             ] GC(84) Pause Young (Normal) (G1 Evacuation Pause) 3096M->3096M(3100M) 1,312ms
[18,815s][info][gc             ] GC(85) Pause Full (G1 Compaction Pause) 3096M->3096M(3100M) 360,737ms

And for preventive collections it would be:

[18,454s][info][gc             ] GC(84) Pause Young (Normal) (G1 Preventive Collection) 3096M->3096M(3100M) 1,312ms
[18,815s][info][gc             ] GC(85) Pause Full (G1 Compaction Pause) 3096M->3096M(3100M) 360,737ms

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

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


More information about the hotspot-gc-dev mailing list