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.
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.
- relates to
-
JDK-8317416 [lworld] JDK-8306441 (Two phase segmented heap dump) needs Valhalla support
- Open
-
JDK-8327645 Serial heap dump should not consume double amount of disk space
- Open
-
JDK-8319948 jcmd man page needs to be updated
- Resolved
-
JDK-8314021 HeapDump: Optimize segmented heap file merging phase
- Resolved
-
JDK-8319053 Segment dump files remain after parallel heap dump on Windows
- Resolved
(2 links to)
1.
|
Release Note: Two Phase Segmented Heap Dump | Resolved | Yi Yang |