What is the meaning of the -XX:NewRatio and -XX:OldSize JVM flags?

廉价感情. 提交于 2019-12-30 00:07:12

问题


I am starting my java app with the following command line :

java -XX:+PrintCommandLineFlags -verbose:gc -XX:+PrintGCDetails \
     -XX:+UseConcMarkSweepGC -jar start.jar

The JVM enables the following options:

-XX:MaxNewSize=87244800 -XX:MaxTenuringThreshold=4 -XX:NewRatio=7
-XX:NewSize=21811200 -XX:OldPLABSize=16 -XX:OldSize=65433600
-XX:+PrintCommandLineFlags -XX:+PrintGC -XX:+PrintGCDetails
-XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC

Can anyone explains me the meaning of NewRatio and OldSize ? In particular OldSize is the initial size of the tenured generation ?


回答1:


The NewRatio is the ratio of old generation to young generation (e.g. value 2 means max size of old will be twice the max size of young, i.e. young can get up to 1/3 of the heap).

The OldSize is not one of the documented options, but I assume it's the size of the tenured space http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html




回答2:


Since NewRatio is already well explained, the following should help with OldSize.

Here, OldSize => default size of the tenured generation. This is the default size of tenured till the time ergonomics comes into play.



来源:https://stackoverflow.com/questions/6859683/what-is-the-meaning-of-the-xxnewratio-and-xxoldsize-jvm-flags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!