-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
Currently G1 boosts heap expansion, artificially reducing the target pause time threshold (i.e. the cpu time the collector is allowed to use), if the heap's current capacity is <= 1/2 of maximum capacity.
This heuristic is (ultimately) an artifact of the original implementation where expansion at low heap sizes doubled the heap size (sans some minor other conditions) to keep throughput (benchmark scores) almost the same afterJDK-8060697.
(Aggressively scaling the heap up decreases the number of GCs to meet the GCTimeRatio, and since it then often overshoots, makes young gen potentially very large, combined with general reluctance on decreasing the heap, reducing GCs as well)
This has several drawbacks though:
* inflates the heap usage; G1 is often running at actual cpu usage far below what would be allowed by GCTimeRatio.
* particularly the case where one wants to keep average memory consumption low but allow headroom for memory usage spikes (to not OOME), is underserved and/or very hard to achieve.
* is surprising for users of GCTimeRatio that there are cases when it is not observed at all
In combination with other suggestions like JDK-8247843, JDK-8238687, JDK-8236073 and others it may be possible to get rid of this heuristic.
This heuristic is (ultimately) an artifact of the original implementation where expansion at low heap sizes doubled the heap size (sans some minor other conditions) to keep throughput (benchmark scores) almost the same after
(Aggressively scaling the heap up decreases the number of GCs to meet the GCTimeRatio, and since it then often overshoots, makes young gen potentially very large, combined with general reluctance on decreasing the heap, reducing GCs as well)
This has several drawbacks though:
* inflates the heap usage; G1 is often running at actual cpu usage far below what would be allowed by GCTimeRatio.
* particularly the case where one wants to keep average memory consumption low but allow headroom for memory usage spikes (to not OOME), is underserved and/or very hard to achieve.
* is surprising for users of GCTimeRatio that there are cases when it is not observed at all
In combination with other suggestions like JDK-8247843, JDK-8238687, JDK-8236073 and others it may be possible to get rid of this heuristic.
- relates to
-
JDK-8236073 G1: Use SoftMaxHeapSize to guide GC heuristics
-
- Open
-
-
JDK-8238687 Investigate memory uncommit during young collections in G1
-
- Open
-
-
JDK-8247843 Reconsider G1 default GCTimeRatio value
-
- Open
-
-
JDK-8349939 G1: Configurable heap expansion aggressiveness
-
- Closed
-
-
JDK-8060697 G1: Investigate heap sizing heuristics
-
- Resolved
-