-
Notifications
You must be signed in to change notification settings - Fork 45.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JVM 参数 -XX:MetaspaceSize 解释错误 #1947
Comments
感谢指出,已经修正。 1、Metaspace 的初始容量并不是 可以参考 Oracle 官方文档 Other Considerations中提到的:
另外,还可以看一下这个试验:JVM 参数 MetaspaceSize 的误解。 2、Metaspace 由于使用不断扩容到 也就是说,MetaspaceSize 表示 Metaspace 使用过程中触发 Full GC 的阈值,只对触发起作用。 垃圾搜集器内部是根据变量 void MetaspaceGC::initialize() {
// Set the high-water mark to MaxMetapaceSize during VM initializaton since
// we can't do a GC during initialization.
_capacity_until_GC = MaxMetaspaceSize;
} |
JVM 参数章节 jvm-parameters-intro.md: L98 中提到:
-XX:MetaspaceSize=N #设置 Metaspace 的初始(和最小大小)
此处解释错误,即 Metaspace 的初始大小非由
-XX:MetaspaceSize
设置。参见 Oracle 官方文档 Other Considerations 中提到:
可见
-XX:MetaspaceSize
是一个提前设定的阈值,会触发 GC,那一定不是初始大小。通过实验证实 Metaspace 的初始大小非由
-XX:MetaspaceSize
设置,而是会引起 Full GC,过程详见:JVM 参数 MetaspaceSize 的误解
The text was updated successfully, but these errors were encountered: