java7 G1选项 [英] java7 G1 Options

查看:118
本文介绍了java7 G1选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到与G1的运作方式有关的任何选项.以下两个命令不再适用于Java7.

I can't find any options relating to how G1 operates. The below two commands no longer work with java7.

-XX:+G1ParallelRSetUpdatingEnabled 
-XX:+G1ParallelRSetScanningEnabled 

推荐答案

我知道只有对G1有影响的选项:

Only options I am aware of that have an impact on G1 are:

  • 激活:

  • to activate:

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

设置G1尝试达到的最大GC暂停时间目标(以毫秒为单位):

to set the max GC pause time goal in milliseconds that G1 will attempt to meet:

-XX:MaxGCPauseMillis=<X>

设置GC暂停的时间间隔,总计可能达到MaxGCPauseMillis:

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 (在某些版本中也被禁用)

设置幸存者空间的大小(不只限于G1)

to set the (not specific to G1 only) survivor spaces' size

-XX:SurvivorRatio=6 (以及其他与幸存者有关的选项)

请注意,所有-XX选项类型均被视为实验性的,随时可能更改(因此,通常不是您想要粘贴在用于快速启动您的.{bat,sh}wrapper.conf脚本或配置文件的内容)企业应用程序.

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.

您提到的2个选项虽然在Java SE 6 Updates的G1首次公开发布时最初可用,但现在已被弃用.在某些版本中,G1YoungGenSize也是如此.

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.

来源:

  • Java SE 6 Update 14 Release Notes
  • G1 Garbage First Collector Introduction
  • Java HotSpot VM Options
  • Plus a presentation on JVM Tuning

这篇关于java7 G1选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆