RFR: 8322043: HeapDumper should use parallel dump by default

Thomas Stuefe stuefe at openjdk.org
Sat Apr 13 06:03:44 UTC 2024


On Fri, 12 Apr 2024 18:50:37 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

> > I am curious: what is the memory overhead for parallel mode, and (I am not familiar with the logic) how many threads are involved? Is the number of thread bounded?
> > I ask because, especially for the OnOOM handling, we may already be at a limit memory-wise. Starting to swap will probably be worse than running single-threaded.
> 
> Good question. It think it's several MB per each additional thread (1MB output buffer, DumperClassCacheTable - 1031 elements max, element size depends on class field numbers, if HeapDumpGzipLevel is set, some buffers for gzip compressors) Number of threads by default is min of `os::initial_active_processor_count() * 3 / 8` and number of GC workers.

For the OOM case, I would probably make it somehow dependent on os::free_memory() then.

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

PR Comment: https://git.openjdk.org/jdk/pull/18748#issuecomment-2053517286


More information about the hotspot-runtime-dev mailing list