-
Notifications
You must be signed in to change notification settings - Fork 101
Description
We have received reports for SapMachine 21 about G1 full gcs that are rather unexpected from the user's perspective since (a) the full gcs are initiated after a longer phases without any gc activity and (b) the full gcs reveal that the heap has filled up with objects of which most are unreachable.
This excerpt of gc logs shows this pattern (visualized in a chart).
In this example there's a phase of 30s without gc activity and then a full gc is triggered.
According to the data the heap fills up with short lived humongous allocations.
Note that eden has been expanded by 3x to 9 GB in GC 12054 (region size 32 MB) just before the phase without gc activity. After the concurrent marking started with 12052 G1 entered a mixed phase where it performs mixed gcs only. Due to the eden expansion it takes long until the next mixed evacuation. Meanwhile free regions were consumed by humongous allocations and evacuation fails.
The behaviour resembles
8355972: G1: Exclusive humongous allocations trigger unnecessary Full GC
As explained above the issue can also occur if eden is very large.
G1 should schedule a concurrent cycle to reclaim unreachable humongous objects. This would likely prevent the full gc.