java7 G1 选项
我找不到任何与 G1 运作方式相关的选项。以下两个命令不再适用于 java7。
-XX:+G1ParallelRSetUpdatingEnabled
-XX:+G1ParallelRSetScanningEnabled
I can't find any options relating to how G1 operates. The below two commands no longer work with java7.
-XX:+G1ParallelRSetUpdatingEnabled
-XX:+G1ParallelRSetScanningEnabled
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,对 G1 产生影响的唯一选项是:
激活:
-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
设置G1 将尝试满足的最大 GC 暂停时间目标(以毫秒为单位):
-XX:MaxGCPauseMillis=
设置 GC 暂停的时间间隔,总计可能发生 MaxGCPauseMillis:
-XX:GCPauseIntervalMillis=
设置年轻代的大小以影响疏散暂停时间:
-XX:+G1YoungGenSize=512m
(在某些版本中也禁用)设置(不仅仅特定于 G1)幸存者空间的大小
-XX:SurvivorRatio=6
(以及其他幸存者相关选项)快速警告
请注意,所有 -XX 选项类型都被视为实验性的,并且可能随时更改(因此,通常不是你想粘在里面的东西用于启动企业应用程序的
.{bat,sh}
、wrapper.conf
脚本或配置文件它们非常有用,但不要过度依赖。您想要一个稳定且耐用的启动器。
您提到的 2 个选项虽然最初在 Java SE 6 更新过程中首次公开发布时提供,但现在已被弃用。一些 来源
:
Only options I am aware of that have an impact on G1 are:
to activate:
-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
to set the max GC pause time goal in milliseconds that G1 will attempt to meet:
-XX:MaxGCPauseMillis=<X>
to set the time interval over which GC pauses totaling up to MaxGCPauseMillis may take place:
-XX:GCPauseIntervalMillis=<X>
to set the size of the young generationto impact evacuation pause times:
-XX:+G1YoungGenSize=512m
(also disabled in some versions)to set the (not specific to G1 only) survivor spaces' size
-XX:SurvivorRatio=6
(and other survivor-related options)Quick Warning
Be warned that all -XX options types are deemed experimental and subject to change at any time (so, usually not stuff you want to stick in the
.{bat,sh}
,wrapper.conf
script or config file used to jump-start your enterprise application.They are pretty useful, but not to rely on too much if you want a stable and durable launcher.
The 2 options you mentioned, while originally available at the time of G1's first public release in the course of Java SE 6 Updates, have now been deprecated. So has
G1YoungGenSize
in some versions.Sources:
Java 7 update 4 现在“完全支持”G1 垃圾收集器,但似乎这些参数不再可用。 :(
这些链接进一步阐明了允许的 JVM 标志:
G1 GC 说明
JVM 选项
Java 7 update 4 now "fully supports" the G1 garbage collector, but it seems those parameters are no longer available. :(
These links shed some more light on the allowed JVM flags:
Description of the G1 GC
JVM options