RFR: 8372412: Increase buffer size for ring-buffer events in CollectedHeap
Stefan Karlsson
stefank at openjdk.org
Mon Nov 24 14:24:33 UTC 2025
On Mon, 24 Nov 2025 14:09:59 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
> Hello,
>
> The buffer size we changed to when separating GC and Metaspace printing code is too small for Parallel and Serial (and maybe also for long-running programs in general). I suggest we bump the buffer-size to 1024 bytes. This also leaves room for more lengthy prints, which ZGC might have if running on a machine with many NUMA nodes.
>
> The default number of events stored in each ring-buffer is 20, controlled via the diagnostic flag `LogEventsBufferEntries`. In it's default setting, the total memory usage of each ring-buffer (Metaspace and Heap) will increase from (512 bytes * 20) 10KB to (1024 * 20) 20KB.
>
> For completeness, the content of the ring-buffers are only printed in hs_err files, using the `-XX:+PrintVMInfoAtExit` (diagnostic flag) or using `jcmd VM.info`
>
> Testing:
> * Local testing with `java -XX:+UseParalellGC/UseSerialGC -XX:+PrintVMInfoAtExit ...` to see that the message is not cut-off any longer.
Marked as reviewed by stefank (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/28476#pullrequestreview-3500654839
More information about the hotspot-gc-dev
mailing list