JDK version 1.7.0 _79
A new object is greater than the Eden area total size will be thrown directly to the old s experiment:
- Xms20M - Xmx20M - Xmn10M - XX: + PrintGCDetails - XX: + UseParNewGC
7 m & lt; 8 m Eden, assigned to Eden:
8 m=8 m Eden, but less than 9 m, the young generation size directly allocated to Old Gen:
9 m & gt; 8 m, directly allocated to Old Gen:
6 m & lt; 8 m, but more than Eden the remaining space, triggered MinorGC, 6 m is assigned to Eden:
The above description is not greater than the Eden the remaining space is allocated to the Old Gen, rather than Eden total space
Back to PretenureSizeThreshold this parameter,
- Xms200m -xmx200m Xmn100m - XX: XX: + PrintGCDetails - SurvivorRatio=3 - XX: XX: + PrintFlagsFinal - PretenureSizeThreshold=31 m - XX: + UseParNewGC
To t3 the trigger MinorGC, Eden area with yue45m, 43 m> t4, t4 was assigned to Eden
Here after t3 trigger MinorGC, Eden remaining space about 45 m, t4 45 m, directly assigned to Old Gen,
Above, PretenureSizeThreshold seems to be only in the second scenario to take the role? Is not greater than PretenureSizeThreshold setting value is directly throw old age? Hope the great god answer!!!!!
CodePudding user response:
Don't sinkCodePudding user response:
Don't sinkCodePudding user response:
You use what kind of the garbage collector? This parameter is only for Serial/ParNew works, deny the other collectorsCodePudding user response:
The - XX: PretenureSizeThreshold=31 m into - XX: PretenureSizeThreshold=31 * 1024 * 1024 the value of the test, the parameters seem to cannot use m for the unitCodePudding user response:
1. XX: PretenureSizeThreshold unit is byte2. If not yet, need to disable TLAB, parameters - XX: - UseTLAB
CodePudding user response:
Good leaders, how can I get this information in the console print stack too?