G1 垃圾收集器的选项不可用?
http://www.oracle.com/technetwork /java/javase/tech/g1-intro-jsp-135488.html 似乎是 G1 垃圾收集器的官方文档。
提到了两个选项:
- -XX:+G1ParallelRSetUpdatingEnabled
- -XX:+G1ParallelRSetScanningEnabled
当配置 tomcat 以使用 G1 和这些选项时,catalina.log 显示
Unrecognized VM option '+G1ParallelRSetUpdatingEnabled'
Could not create the Java virtual machine.
My JVM is
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
和
JAVA_OPTS="-server -Djava.awt.headless=true -Xmx3G -Xss512k -XX:MaxPermSize=1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+G1ParallelRSetUpdatingEnabled -XX:+G1ParallelRSetScanningEnabled"
任何提示为什么 -XX:+G1ParallelRSetScanningEnabled 不起作用?
http://www.oracle.com/technetwork/java/javase/tech/g1-intro-jsp-135488.html seems to be the official docs for the G1 garbage collector.
There are two options mentioned:
- -XX:+G1ParallelRSetUpdatingEnabled
- -XX:+G1ParallelRSetScanningEnabled
When configuring tomcat to use G1 with these options, catalina.log shows up
Unrecognized VM option '+G1ParallelRSetUpdatingEnabled'
Could not create the Java virtual machine.
My JVM is
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
and
JAVA_OPTS="-server -Djava.awt.headless=true -Xmx3G -Xss512k -XX:MaxPermSize=1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+G1ParallelRSetUpdatingEnabled -XX:+G1ParallelRSetScanningEnabled"
Any hints why -XX:+G1ParallelRSetScanningEnabled does not work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它已被禁用。请参阅此问题和我的答案。
您链接到的文档(正如其名称可能或可能没有明确暗示的那样)当时是向世界介绍 G1(不是“入门指南”中的介绍)。从那时起事情就发生了变化。
It's been disabled. See this question and my answer.
The documentation that you are linking to, as its name may or may not clearly suggest, was at the time the introduction of G1 to the world (not introduction as in "starter guide"). Things have evolved since.
G1是Oracle在Java 7 U4中正式引入的:
http://www.oracle.com/technetwork/java/javase /7u4-relnotes-1575007.html
您可以在这里找到官方文档:
http://docs.oracle.com/javase/7 /docs/technotes/guides/vm/G1.html
和命令行选项:
http://www.oracle.com/technetwork /java/javase/tech/vmoptions-jsp-140102.html#G1Options
G1 was officially introduced by Oracle in Java 7 U4:
http://www.oracle.com/technetwork/java/javase/7u4-relnotes-1575007.html
You can find the official documentation here:
http://docs.oracle.com/javase/7/docs/technotes/guides/vm/G1.html
and command line options here:
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html#G1Options