TenuringThreshold being adaptive when UseAdaptiveSizePolicy is off

Wessam Hassanein wessam at google.com
Thu Mar 12 17:49:14 UTC 2015


Jungwoo, I think the answer to your question of fixing the tenuring
threshold in CMS for jdk8 is to set the TargetSurvivorRatio to 100. This
will result in always using the MaxTenuringThreshold as the tenuring
threshold and the desired_survivor_size as the full survivor_capacity which
would match ParallelScavange with UseAdaptiveSizePolicy disabled.

Regards,

Wessam

On Tue, Mar 10, 2015 at 11:37 AM, Jon Masamitsu <jon.masamitsu at oracle.com>
wrote:

>
> On 3/10/2015 4:59 AM, Jungwoo Ha wrote:
>
> Tao,
>
>  CMS no longer use InitialTenuringThreshold.
> IIRC, even before when CMS used InitialTenuringThreshold, setting initial
> and max the same value didn't turn off the adaptiveness.
>
>
> I think we're removing that  code from CMS in jdk9
>
> compute_survivor_space_size_and_threshold()
>
> The implementation of adaptive size policy for CMS never
> worked correctly.  Too many times it does the exact wrong
> thing.
>
> Jon
>
>
>
>
> On Tue, Mar 10, 2015 at 12:23 AM, Tao Mao <yiyeguhu at gmail.com> wrote:
>
>> Hi Jungwoo,
>>
>>  Would fixing InitialTenuringThreshold and MaxTenuringThreshold to the
>> same value work for you?
>>
>>  Thanks.
>>  Tao Mao
>>
>>
>> On Mon, Mar 9, 2015 at 10:39 PM, Jungwoo Ha <jwha at google.com> wrote:
>>
>>> We were investigating some features and figured out that
>>> ParallelScavange and ParNew has different TenuringTreshold heuristics.
>>> We thought it would be nice to have a flag that can control the
>>> adaptiveness, so that we can fix it on purpose to isolate other performance
>>> factors.
>>>  --Jungwoo
>>>
>>> On Mon, Mar 9, 2015 at 11:27 AM, Jon Masamitsu <jon.masamitsu at oracle.com
>>> > wrote:
>>>
>>>>  Jungwoo,
>>>>
>>>> On 03/06/2015 06:03 PM, Jungwoo Ha wrote:
>>>>
>>>> I think it is the same for all JDK{7,8,9}.
>>>>
>>>>  arguments.cpp disabled UseAdaptiveSizePolicy for CMS.
>>>> parallel scavange initializes _tenuring_threshold with
>>>>   _tenuring_threshold = (UseAdaptiveSizePolicy) ?
>>>> InitialTenuringThreshold : MaxTenuringThreshold;
>>>> whereas CMS uses
>>>>   _tenuring_threshold = MaxTenuringThreshold;
>>>>
>>>>  adjust_desired_tenuring_threshold() is called inside
>>>> ParNewGeneration::collect(), which calls compute_tenuring_threshold.
>>>> It only uses MaxTenuringThreshold and TargetSurvivorRatio.
>>>> I don't see any other flags here.
>>>>
>>>>
>>>>  Yes, this is the intended behavior.
>>>>
>>>> You're saying we're sometimes wasting survivor space?
>>>>
>>>> Jon
>>>>
>>>>
>>>> On Fri, Mar 6, 2015 at 4:28 PM, Jon Masamitsu <jon.masamitsu at oracle.com
>>>> > wrote:
>>>>
>>>>> This is in jdk9?
>>>>>
>>>>> Jon
>>>>>
>>>>>
>>>>> On 3/6/2015 4:21 PM, Jungwoo Ha wrote:
>>>>>
>>>>>> On CMS when UseAdaptiveSizePolicy is off, still tenuring_threshold is
>>>>>> being changed.
>>>>>> Is this an intended behavior?
>>>>>> (yes. I know it is not "size" related heuristics)
>>>>>>
>>>>>> It would be nice to have a flag that can disable adjusting tenuring
>>>>>> threshold,
>>>>>> or at least set minimum threshold. When the default heuristics
>>>>>> doesn't work,
>>>>>> there are nothing much we can do other than changing the Max.
>>>>>>
>>>>>> --Jungwoo
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20150312/9ac3fce4/attachment.htm>


More information about the hotspot-gc-dev mailing list