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

Two phase segmented heap dump

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • hotspot
    • None
    • svc
    • b10

      heap dump brings about pauses for application's execution(STW), this is a well-known pain. JDK-8252842 have added parallel support to heapdump in an attempt to alleviate this issue. However, all concurrent threads competitively write heap data to the same file, and more memory is required to maintain the concurrent buffer queue. In experiments, we did not feel a significant performance improvement from that.

      I propose to use a two-stage segmented heap dump:

      1. Stage One(STW): Concurrent threads directly write data to multiple heap files.
      2. Stage Two(Non-STW): Merge multiple heap files into one complete heap dump file.

      Now concurrent worker threads are not required to maintain a buffer queue, which would result in more memory overhead, nor do they need to compete for locks. It significantly reduces 73~80% application pause time.

            yyang Yi Yang
            yyang Yi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: