JDK-8327645 : Serial heap dump should not consume double amount of disk space
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 22
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2024-03-08
  • Updated: 2024-03-08
Related Reports
Relates :  
Relates :  
Description
After JDK-8321565, when dumping the heap in serial (e.g. via -parallel=1 option for jcmd GC.heap_dump), heap dumper creates two files (e.g. foo.hprof and foo.hprof.p0), then merges the two files at a later time.

This consumes almost double the size of the heap dump, as the disk needs to keep both files alive during merging. This also presents a challenge for systems with limited disk space and require doing serial heap dump to a network socket.

Thus, we should make the heap dumper write to a single file in serial dump mode.
Comments
The actual change that introduced this problem is JDK-8321565, not JDK-8306441. I revised the description.
08-03-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18160 Date: 2024-03-08 01:07:50 +0000
08-03-2024