On Fri, 12 Apr 2024 18:50:37 GMT, Alex Menkov <amen...@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

Reply via email to