G1 sparse remembered set wastes 50% of memory

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

        1. sparseprthalf.diff
          4 kB
          Thomas Schatzl
        2. sparseprthalf2.diff
          3 kB
          Thomas Schatzl

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

              Created:
              Updated:
              Resolved: