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" |
Author
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:
CMSIntiatingOccupancyFractionequals minus one meansCMSTriggerRatiois used, and here isCMSTriggerRatio:So, here is how default
CMSInitiatingOccupancyFractioncalculated:CMSInitiatingOccupancyFraction = (100 - MinHeapFreeRatio) + (CMSTriggerRatio * MinHeapFreeRatio / 100), that is 92%In book "深入理解Java虚拟机", the arthor says that the default
CMSInitiatingOccupancyFractionis 68%, and he is wrong. 68% is the right value in jdk 5 because theCMSTriggerRatiois jdk 5 is default 20%.