JDK-8306441 : Two phase segmented heap dump
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-04-19
  • Updated: 2024-03-08
  • Resolved: 2023-08-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b10Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8313450 :  
Description
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.
Comments
Changeset: 31a307f2 Author: Yi Yang <yyang@openjdk.org> Date: 2023-08-09 01:58:57 +0000 URL: https://git.openjdk.org/jdk/commit/31a307f2fbe7b99435f50e5404c2a95f07b9a77b
09-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13667 Date: 2023-04-26 09:37:46 +0000
26-04-2023