RFR: 8252842: Extend jmap to support parallel heap dump [v10]

Ralf Schmelter rschmelter at openjdk.java.net
Mon Feb 22 05:55:40 UTC 2021


On Fri, 19 Feb 2021 14:36:00 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> 8252842: Extend jmap to support parallel heap dump
>
> Lin Zang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix build fail issue on windows

Hi,

I've benchmarked the code on my machine (128GB memory, 56 logical CPUs) with an example creating a 32 GB heap dump. I only saw a 10 percent reduction in time, both using uncompressed and compressed dumps. Have you seen better numbers in your benchmarks?

And it seems to potentially use a lot more temporary memory. In my example I had a 4 GB array in the heap and the new code allocated 4 GB of additional memory to write this array. This could happen in more threads in parallel, increasing the memory consumption even more.

If the above problems could be fixed, I would suggest to just use the parallel code in all cases.

src/hotspot/share/services/heapDumper.cpp line 383:

> 381: };
> 382: 
> 383: // Supports I/O ooperations for a dump

ooperations->operations

src/hotspot/share/services/heapDumper.cpp line 650:

> 648:   void enqueue(ParWriterBufferQueueElem* entry) {
> 649:     if (_head == NULL) {
> 650:       assert(is_empty() && _tail == NULL, "Sanity check");

When I have run the code with assertions enabled, this one failed since _tail was not NULL.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2261


More information about the serviceability-dev mailing list