-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: None
-
Component/s: hotspot
The current default behavior is to collect old generation each time it has grown by 12.5% since its live data as measured at time of previous old-generation mark. This default behavior results in excessive old-generation collections for services that have a relatively small old generation size (e.g. 15% of total heap size).
For services that have much larger old-generation sizes (e.g. 5 Gb out of 7 Gb heap size), this default trigger is too conservative, allowing too much growth of old generation before it is collected. This puts stress on young collections, which happen much more frequently when old is allowed to control beyond its needed size.
Several refinements to the existing heuristics are proposed:
1. Add a second old-generation trigger that is based on how much growth of old generation measured as a percentage of the heap size that was not part of the old generation's live data at previous marking.
1. Example 1: with a 35% trigger and previous old-gen live data equal to 15% of heap, we would trigger when old grows by 42.5% of the total heap size as computed from 35% of 85%.
2. Example 2: with a 35% trigger and previous old-gen live data equal to 75% of heap, we would trigger when old grows by 8.75% of the total heap size, as computed from 35% of 25%.
2. Make compaction of the old generation more aggressive when old generation consumes larger percentages of the heap. The default behavior is to not select for mixed evacuation any region that has less than 25% garbage. However, if old gen represents more than 75% of the total heap size, seek to pack the old-gen memory more tightly, for example collecting regions that have only 15% garbage.
3. Change the existing default growth trigger from 12.5% to 50%. This will decrease frequency of old-generation collections for systems that have relatively small old-generation sizes.
For services that have much larger old-generation sizes (e.g. 5 Gb out of 7 Gb heap size), this default trigger is too conservative, allowing too much growth of old generation before it is collected. This puts stress on young collections, which happen much more frequently when old is allowed to control beyond its needed size.
Several refinements to the existing heuristics are proposed:
1. Add a second old-generation trigger that is based on how much growth of old generation measured as a percentage of the heap size that was not part of the old generation's live data at previous marking.
1. Example 1: with a 35% trigger and previous old-gen live data equal to 15% of heap, we would trigger when old grows by 42.5% of the total heap size as computed from 35% of 85%.
2. Example 2: with a 35% trigger and previous old-gen live data equal to 75% of heap, we would trigger when old grows by 8.75% of the total heap size, as computed from 35% of 25%.
2. Make compaction of the old generation more aggressive when old generation consumes larger percentages of the heap. The default behavior is to not select for mixed evacuation any region that has less than 25% garbage. However, if old gen represents more than 75% of the total heap size, seek to pack the old-gen memory more tightly, for example collecting regions that have only 15% garbage.
3. Change the existing default growth trigger from 12.5% to 50%. This will decrease frequency of old-generation collections for systems that have relatively small old-generation sizes.
- links to
-
Review(master)
openjdk/jdk/28561