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

Parallel GC: Waiting on ExpandHeap_lock may cause "expansion storm"

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • hotspot
    • gc
    • b10

      When expanding the old gen heap during young gc, that section of code is guarded by the ExpandHeap_lock. If multiple threads are out of memory (i.e. old gen PLAB), they will queue up on that lock.

      Since the threads after the first getting the ExpandHeap_lock do not retry the allocation, they will blindly expand the heap again, ultimately causing a "heap expansion storm".

      This not only takes lots of time, but also expands the heap unnecessarily.

            kbarrett Kim Barrett
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: