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

ZGC: Remove unused remembered sets

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • hotspot
    • gc
    • b17

      In ZGC, when a page become old it needs a remembered set (remset) which stores 2 bits per byte (2/64) resulting in a memory overhead of 3.125%.

      When the old page is potentially freed and inserted in the page cache, it can later be re-used as a young page. In this case, the remset is still allocated even though the young page does not need a remset. This is especially noteworthy for long-running programs where pages are recycled for a long enough period to have a remset allocated for close to all pages.

      The attached plot shows remset memory usage for a program that frequently recycles pages using a cahe-mechanism. As remsets for young pages are unused, it should be considered wasted memory.

      Instead of keeping the remset when an old page is inserted into the page cache, the remset should be deleted/freed instead to not waste memory. This would mean that no remsets are stored for young pages, but only old pages.

            jsikstro Joel Sikstrom
            jsikstro Joel Sikstrom
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: