Question about -XX:+PrintTenuringDistribution and age not being printed.
Jon Masamitsu
jon.masamitsu at oracle.com
Fri Apr 27 18:09:52 PDT 2012
On 4/27/2012 3:30 PM, John O'Brien wrote:
> Thanks for the quick response today.
>
> To finish up,using Parallel old with UseAdaptivePolicy is true by
> default and I -XX:MaxTenuringThreshold=3 I expected an incompatible
> parameter error.
Our consistency checking is not that good but in this
case MaxTenuringThreshold is used by ParallelScavenge
but not in the same way as ParNew. ParallelScavenge
picks a tenuring threshold that it thinks will keep the
survivor spaces from over flowing. If the survivor
spaces don't have much in them after a scavenge,
ParallelScavenge may raise the tenuring threshold to
better use the survivor spaces but not above MaxTenuringThreshold.
> I did not get it. The logs show the tenuring threshold adjusted
> below and above the value of 5 e.g "new threshold 7 (max 5)."
I haven't seen that behavior. That's a bug.
> Then I decided to switch of useAdaptiveSizePolicy and see if threshold
> would be stuck at 5 but no threshold logs were printed.
The logging code is also guarded by UseAdaptiveSizePolicy.
> My question: Does -XX:MaxTenuringThreshold=3 work with
> ParallelScavenge? (Seems not).
I just looked at the code and I don't see what's wrong.
Jon
> Looks like my override is to fix size the survivor spaces through use
> of some other flags? This will also turn off adaptivesizepolicy as it
> is not needed.
>
> Regards,
> John
>
>
> On Fri, Apr 27, 2012 at 2:29 PM, Jon Masamitsu<jon.masamitsu at oracle.com> wrote:
>> John,
>>
>>
>> On 4/27/2012 2:03 PM, John O'Brien wrote:
>>> Hi everyone,
>>>
>>> I understand that :
>>>
>>> 1) par-new has features that make it work with CMS.
>> Yes.
>>
>>> 2) par-scavenge does not have these features and is incompatible with CMS.
>> Yes.
>>> 3) Otherwise they are the same core algorithm...both parallel stop the
>>> world copying collectors.
>> ParNew and Parallel Scavenge are two different implementations of
>> parallel STW
>> collectors. They share some code but much is different. ParallelScavenge
>> support UseAdaptiveSizePolicy and ParNew does not (never finished).
>> ParallelScavenge
>> varies the tenuring threshold to keep the survivor spaces from
>> overflowing and
>> also varies the sizes of the survivor spaces relative to eden while ParNew
>> has a fixed ratio between eden and the survivor sizes. It's hard to
>> keep track
>> of the differences.
>>
>>> Why does PrintTenuringDistribution only print out the ages when ParNew
>>> is enabled?
>>> If they are the same algorithm then shouldn't they both print out age
>>> ? par-scavenge does not print "ages" for me when
>>> PrintTenuringDistribution is on.
>> Not the same algorithm.
>>
>>> I use Parallel Old and Parallel Scavenge (ParNew can't be used with
>>> Parallel Old).
>> Correct.
>>
>> Jon
>>
>>> Ref: https://blogs.oracle.com/jonthecollector/entry/our_collectors
>>>
>>> I searched the mailing lists and did not see anything , read some
>>> blogs and looked through some books.
>>>
>>>
>>> Regards,
>>> John
>>> _______________________________________________
>>> hotspot-gc-use mailing list
>>> hotspot-gc-use at openjdk.java.net
>>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>> _______________________________________________
>> hotspot-gc-use mailing list
>> hotspot-gc-use at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
More information about the hotspot-gc-use
mailing list