[英]How to determine region size automatically generated by g1gc?
Documentation says that: 文档说:
Upon startup, the Java Virtual Machine (JVM) sets the region size
启动时,Java虚拟机(JVM)设置区域大小
How could I determine what size was chosen for g1gc regions at the startup? 如何确定启动时为g1gc区域选择的大小? How to get notification when it is changed during runtime?
在运行期间更改通知时如何获取通知?
I had tried to log gc info with -XX:+PrintGCDetails
but it contains no information about region size. 我曾尝试使用
-XX:+PrintGCDetails
记录gc信息,但其中不包含有关区域大小的信息。
The region size information can be printed with the -XX:G1PrintRegionLivenessInfo
flag which must be used in conjunction with the -XX:+UnlockDiagnosticVMOptions
flag (well, at least used to, not sure about the latest JVMs). 可以使用
-XX:G1PrintRegionLivenessInfo
标志来打印区域大小信息,该标志必须与-XX:+UnlockDiagnosticVMOptions
标志结合使用(很好,至少用于确定最新的JVM)。
See also this article in the Oracle blog and this very insightful article from Hubspot (simply search for "Min Heap Size"). 另请参见这篇文章在Oracle博客, 这非常有见地的文章 ,从Hubspot(只需搜索“最小堆大小”)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.