<div dir="ltr">Jungwoo, I think the answer to your question of fixing the <span style="font-size:12.8000001907349px">tenuring threshold in </span>CMS for jdk8 is to set the TargetSurvivorRatio to 100. This will result in always using the <span style="color:rgb(0,0,0);line-height:16.25px">MaxTenuringThreshold as the tenuring threshold and the </span><span style="color:rgb(0,0,0);line-height:16.25px">desired_survivor_size as the full survivor_capacity which would match </span><span style="font-size:12.8000001907349px">ParallelScavange with </span>UseAdaptiveSizePolicy disabled<span style="color:rgb(0,0,0);line-height:16.25px">.</span><br><div><div><span style="color:rgb(0,0,0);line-height:16.25px"><br></span></div><div><span style="color:rgb(0,0,0);line-height:16.25px">Regards,</span></div><div><span style="color:rgb(0,0,0);line-height:16.25px"><br></span></div><div><span style="color:rgb(0,0,0);line-height:16.25px">Wessam</span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 11:37 AM, Jon Masamitsu <span dir="ltr"><<a href="mailto:jon.masamitsu@oracle.com" target="_blank">jon.masamitsu@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span class="">
<br>
<div>On 3/10/2015 4:59 AM, Jungwoo Ha wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Tao,
<div><br>
</div>
<div>CMS no longer use InitialTenuringThreshold.</div>
<div>IIRC, even before when CMS used InitialTenuringThreshold,
setting initial and max the same value didn't turn off the
adaptiveness.</div>
</div>
</blockquote>
<br></span>
I think we're removing that code from CMS in jdk9<br>
<br>
compute_survivor_space_size_and_threshold()<br>
<br>
The implementation of adaptive size policy for CMS never<br>
worked correctly. Too many times it does the exact wrong<br>
thing.<span class="HOEnZb"><font color="#888888"><br>
<br>
Jon</font></span><div><div class="h5"><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Mar 10, 2015 at 12:23 AM, Tao
Mao <span dir="ltr"><<a href="mailto:yiyeguhu@gmail.com" target="_blank">yiyeguhu@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Jungwoo,
<div><br>
</div>
<div>Would fixing InitialTenuringThreshold and
MaxTenuringThreshold to the same value work for you?</div>
<div><br>
</div>
<div>Thanks.</div>
<span><font color="#888888">
<div>Tao Mao</div>
<div><br>
</div>
</font></span></div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Mar 9, 2015 at 10:39
PM, Jungwoo Ha <span dir="ltr"><<a href="mailto:jwha@google.com" target="_blank">jwha@google.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">We were investigating some features
and figured out that ParallelScavange and ParNew
has different TenuringTreshold heuristics.
<div>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.</div>
<span><font color="#888888">
<div>--Jungwoo</div>
</font></span></div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Mar 9, 2015
at 11:27 AM, Jon Masamitsu <span dir="ltr"><<a href="mailto:jon.masamitsu@oracle.com" target="_blank">jon.masamitsu@oracle.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Jungwoo,<span><br>
<br>
<div>On 03/06/2015 06:03 PM, Jungwoo
Ha wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I think it is the
same for all JDK{7,8,9}.
<div><br>
</div>
<div>arguments.cpp disabled
UseAdaptiveSizePolicy for CMS.</div>
<div>parallel scavange
initializes
_tenuring_threshold with</div>
<div> _tenuring_threshold =
(UseAdaptiveSizePolicy) ?
InitialTenuringThreshold :
MaxTenuringThreshold;</div>
<div>whereas CMS uses</div>
<div> _tenuring_threshold
= MaxTenuringThreshold;</div>
<div><br>
</div>
<div>adjust_desired_tenuring_threshold()
is called inside
ParNewGeneration::collect(),
which calls
compute_tenuring_threshold.</div>
<div>It only uses
MaxTenuringThreshold and
TargetSurvivorRatio.</div>
<div>I don't see any other flags
here.<br>
</div>
</div>
</blockquote>
<br>
</span> Yes, this is the intended
behavior.<br>
<br>
You're saying we're sometimes wasting
survivor space?<span><font color="#888888"><br>
<br>
Jon</font></span><span><br>
<br>
<blockquote type="cite">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri,
Mar 6, 2015 at 4:28 PM, Jon
Masamitsu <span dir="ltr"><<a href="mailto:jon.masamitsu@oracle.com" target="_blank">jon.masamitsu@oracle.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This
is in jdk9?<span><font color="#888888"><br>
<br>
Jon</font></span>
<div>
<div><br>
<br>
On 3/6/2015 4:21 PM,
Jungwoo Ha wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On CMS when
UseAdaptiveSizePolicy
is off, still
tenuring_threshold is
being changed.<br>
Is this an intended
behavior?<br>
(yes. I know it is not
"size" related
heuristics)<br>
<br>
It would be nice to
have a flag that can
disable adjusting
tenuring threshold,<br>
or at least set
minimum threshold.
When the default
heuristics doesn't
work,<br>
there are nothing much
we can do other than
changing the Max.<br>
<br>
--Jungwoo<br>
</blockquote>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>