RFR: 8293861: G1: Disable preventive GCs by default
Albert Mingkun Yang
ayang at openjdk.org
Fri Sep 16 12:21:43 UTC 2022
On Fri, 16 Sep 2022 10:49:21 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I get reviews for this change that disables preventive collections by default?
>
> [JDK-8257774](https://bugs.openjdk.org/browse/JDK-8257774) added "preventive" garbage collections in G1: speculative garbage collections added to avoid costly evacuation failures due to allocation bursts filling up the heap quickly.
>
> These preventive garbage collections have some issues: the main issue is that it's an additional gc:
>
> * object aging is based on number of gcs, so additional gcs cause premature promotion
> * more promotion means more mixed gc phases
> * additional, potentially unnecessary gc pause
>
> This is somewhat compounded by that the current prediction to trigger preventive garbage collections is very conservative, triggering preventive garbage collections too often and too early.
>
> As we have gathered experience with this feature, we found that in many cases it is a net loss - particularly since its introduction the reason for existing, evacuation failures, got extremely fast (e.g. [JDK-8256265](https://bugs.openjdk.org/browse/JDK-8256265)).
>
> At this point the suggestion is to disable this feature by default. In the future it might be completely removed.
>
> Since this is a diagnostic option, there is no CSR required. There will be a release note for this change.
>
> Testing: tier1, made sure that no test expects preventive gcs
>
> Thanks,
> Thomas
Marked as reviewed by ayang (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/10304
More information about the hotspot-gc-dev
mailing list