JDK-8351405 : G1: Collection set early pruning causes suboptimal region selection
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-07
  • Updated: 2025-05-02
  • Resolved: 2025-03-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b16Fixed
Related Reports
Relates :  
Description
When pruning the collection set before rebuild, only freed space is taken into account when selecting these regions (i.e. gc-efficiency).

This can cause G1 selecting extremely bad to evacuate regions (with low efficiency), which in turn then can cause pause time spikes, particularly in combination with grouping.

One option is to improve the gc efficiency calculation by using more information, like number of incoming references calculated during marking, so improve the selection.

Another option is to select more regions to build the remembered sets for and prune later again.
Comments
In this thread on hotspot-gc-dev (https://mail.openjdk.org/pipermail/hotspot-gc-dev/2024-February/045708.html) the same problem this change fixes seems to be described.
02-05-2025

Changeset: 6879c446 Branch: master Author: Ivan Walulya <iwalulya@openjdk.org> Date: 2025-03-25 09:24:36 +0000 URL: https://git.openjdk.org/jdk/commit/6879c446c6e7734c162c85bd2bd3d7f3b012cca4
25-03-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24076 Date: 2025-03-17 11:19:02 +0000
17-03-2025