Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075289

G1 sparse remembered set wastes 50% of memory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Subcomponent:
      gc

      Description

      G1 preallocates the bucket entries for the SparsePRT/RSHashTable. The amount of preallocated buckets is its full capacity (e.g. allocates space for 100 SparsePRTEntry instances assigned to RSHashTable::_entries if current capacity is 100).

      The RSHashTable will always be expanded in SparsePRT::add_card() (always protected by a lock) as soon as the RSHashTable reaches 50% occupancy. So in effect, 50% of allocated SparsePRTEntry instances are never ever used.

      The amount of allocation should be at least changed to match the expansion threshold.

        Attachments

          Activity

            People

            • Assignee:
              tschatzl Thomas Schatzl
              Reporter:
              tschatzl Thomas Schatzl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: