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

G1 sparse remembered set wastes 50% of memory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • gc

      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.

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

              Created:
              Updated:
              Resolved: