JDK-8048504 : G1: Investigate replacing the coarse and fine grained data structures in the remembered sets
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-06-27
  • Updated: 2021-06-28
  • Resolved: 2021-06-21
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 18
18 b03Fixed
Related Reports
Relates :  
Description
The remembered sets trade off between iteration time and memory footprint involves coarsening bitmaps when running out of bitmaps. This model is a bit crude, and use cases exist where excessive coarsening leads to lots of unnecessary card scanning.

A more smooth model for lowering the precision when remembered sets become saturated would be to use a trie data structure.
A remembered set would then consist of a predetermined number of nodes to use in the trie, and when nodes run out, a single node could be coarsened, and the parent would consider the coarsened child as "present and 100% saturated". This would be a more smooth coarsening model, hopefully resulting in lowered remembered set scan times.
The initial suggestion is to have the branching factors 5, 5, 6, adding up to 16 bits, which is the current maximal number of cards in a region.

Another benefit of this would be that remembered sets would have a completely deterministic size, and can have their memory allocated up front. Also, the remembered set size could be configurable, allowing for fine tuning depending on application requirements.

Worth to consider: keeping the sparsePRT for when there are very few entries in a given region. The amount of overhead for sparse insertions could be too large.
Comments
Changeset: 1692fd2e Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2021-06-21 10:06:05 +0000 URL: https://git.openjdk.java.net/jdk/commit/1692fd2eba7164ebd11fce1c02696a9053d131af
21-06-2021