-
Bug
-
Resolution: Fixed
-
P3
-
hs22
-
b05
-
generic
-
generic
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2215474 | 8 | Tony Printezis | P3 | Resolved | Fixed | b08 |
JDK-2214884 | 7u2 | Tony Printezis | P3 | Closed | Fixed | b08 |
The code that sets / calculates G1's young list target length has many
inconsistencies and mistakes. The include:
a) There are two entry points:
* calculate_young_list_target_length(), for use when ergonomics are or
are not enabled.
* calculate_young_list_target_length(size_t rs_lengths), for use when
ergonomics are enabled and the calculation needs to be revised due
to RS lengts being measured to be longer than the last prediction.
Unfortunately, the latter does not seem to recalculate several values
including the max GC locker expansion and the max survivor region
number, both of which are based on the calculated target length.
b) There is no obvious place to bound the final young target length
with a desired min and/or max length, given that it's done differently
(and in a way: redundantly) for the two entry points described in a).
c) The max survivor region number calculation is done with an integer
division and it is not taking into account the fact that the resulting
value could be between 0.0 and 1.0. This meant that, in some cases,
the max survivor number is set to 0.
d) The code the calculates the optimal young list length target using
a binary search is incorrect and exits earlier than it should without
finding an optimal result. The reason for this is that it is written
in a way that it keeps halving the distance between min and max length
by decreasing max length, until it finds a length that fits into the
pause time target. But it then stops, instead of attempting to
increase max length (while still halving the distance between min and
max length). This means that, even though the result fits into the
pause time target, it is not optimal and there are longer lengths that
will also fit into the pause time target.
inconsistencies and mistakes. The include:
a) There are two entry points:
* calculate_young_list_target_length(), for use when ergonomics are or
are not enabled.
* calculate_young_list_target_length(size_t rs_lengths), for use when
ergonomics are enabled and the calculation needs to be revised due
to RS lengts being measured to be longer than the last prediction.
Unfortunately, the latter does not seem to recalculate several values
including the max GC locker expansion and the max survivor region
number, both of which are based on the calculated target length.
b) There is no obvious place to bound the final young target length
with a desired min and/or max length, given that it's done differently
(and in a way: redundantly) for the two entry points described in a).
c) The max survivor region number calculation is done with an integer
division and it is not taking into account the fact that the resulting
value could be between 0.0 and 1.0. This meant that, in some cases,
the max survivor number is set to 0.
d) The code the calculates the optimal young list length target using
a binary search is incorrect and exits earlier than it should without
finding an optimal result. The reason for this is that it is written
in a way that it keeps halving the distance between min and max length
by decreasing max length, until it finds a length that fits into the
pause time target. But it then stops, instead of attempting to
increase max length (while still halving the distance between min and
max length). This means that, even though the result fits into the
pause time target, it is not optimal and there are longer lengths that
will also fit into the pause time target.
- backported by
-
JDK-2215474 G1: fix inconsistencies and mistakes in the young list target length calculations
- Resolved
-
JDK-2214884 G1: fix inconsistencies and mistakes in the young list target length calculations
- Closed
- relates to
-
JDK-6929868 G1: introduce min / max young gen size bounds
- Closed
-
JDK-7084525 G1: Generate ergonomic decision log records for young gen sizing and for pause prediction
- Closed