Created
December 19, 2011 07:07
-
-
Save khotyn/1495819 to your computer and use it in GitHub Desktop.
Default CMSInitiatingOccupancyFraction value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -XX:+UseConcMarkSweepGC -XX:+PrintFlagsFinal Main | grep -P "CMSInitiatingOccupancyFraction|CMSTriggerRatio|MinHeapFreeRatio" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output of this command in Ubuntu 11.10, JDK 1.6 update 26:
CMSIntiatingOccupancyFraction
equals minus one meansCMSTriggerRatio
is used, and here isCMSTriggerRatio
:So, here is how default
CMSInitiatingOccupancyFraction
calculated:CMSInitiatingOccupancyFraction = (100 - MinHeapFreeRatio) + (CMSTriggerRatio * MinHeapFreeRatio / 100)
, that is 92%In book "深入理解Java虚拟机", the arthor says that the default
CMSInitiatingOccupancyFraction
is 68%, and he is wrong. 68% is the right value in jdk 5 because theCMSTriggerRatio
is jdk 5 is default 20%.