JDK-8351403 : G1: Spiky pause times due to too large initial group selection
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 25
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2025-03-07
  • Updated: 2025-05-28
  • Resolved: 2025-05-28
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
25Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Currently G1 groups all of the regions to be expected to be evacuated (minimal # of regions) into a single remset group to be evacuated in the first mixed gc.

The problem is that this selection is done at the remark pause, so there is incomplete information about how long it takes to actually evacuate this group.

This causes unexpectedly long pauses; another related issue is that in some cases this huge group will also be ordered (in the cleanup pause) after the first mixed gc.

Since this group is so large, it is likely that it will accumulate lots of additional remembered set entries during that time, causing pause times misses too.

There are two related issues here: the size of that group, and that it can be reordered. The latter is expected, and by decreasing the size that issue may not appear any more.
Comments
We improved region grouping in JDK-8351405 by tracking the number of incoming references to each region. This information allows us to estimate GC efficiency during the remark phase. JDK-8351405 significantly reduces the occurrence of the spikes caused by inefficient grouping. However, in cases where spikes persist, they are a result of the G1MixedGCCountTarget; these spikes would have happened even without the grouping.
28-05-2025