<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 3/10/2015 12:01 AM, Kirk Pepperdine
wrote:<br>
</div>
<blockquote
cite="mid:22636B3C-4309-4AD0-97CA-BFE200EAB808@kodewerk.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Hi Jon,
<div><br>
</div>
<div>Slightly off topic.</div>
<div><br>
</div>
<div>This question triggered me to once again take a closer look
at psAdaptiveSizePolicy and CMSAdaptiveSizePolicy. What I saw is
that</div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">uint
PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">
<span style="color:
#bb2ca2">bool</span> is_survivor_overflow,</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">
uint
tenuring_threshold,</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;">
size_t
survivor_limit) {</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</div>
<div style="margin: 0px;">and</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</div>
<div style="margin: 0px;">
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">uint
CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">
<span
style="color: #bb2ca2">bool</span> is_survivor_overflow,</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">
uint
tenuring_threshold,</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;">
size_t
survivor_limit) {</div>
<div style="font-family: Menlo; font-size: 11px; margin: 0px;"><br>
</div>
<div style="margin: 0px;">are cut and paste copies of each
other. In fact the amount of common code in both classes
suggests they were a complete cut and paste copy of each
other. Yes there are a couple of minor differences but not
enough to warrant two separate classes. It’s also a bit
scary to see this level of cut and paste in the JVM source
code. Maybe it was intentional, if so it should have been
justified with a comment but … I’ll say no more on this
topic.</div>
</div>
</div>
</blockquote>
<br>
That was a project that was never completed. We're removing it in
9.<br>
<blockquote
cite="mid:22636B3C-4309-4AD0-97CA-BFE200EAB808@kodewerk.com"
type="cite">
<div>
<div style="margin: 0px;">
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">As I’ve mentioned before,
AdaptiveSize can get into this degenerative pathological
condition in low free heap conditions. It starts with higher
GC frequencies slowing the allocation rates from the mutator
threads. These lower allocation rates when feed back into
adaptive sizing, are a signal to shrink the size of heap
which is exactly the opposite of what you’d like to see in
this condition. I have offered to work on a patch to fix
this but I’ve been told by several people that they have a
patch to correct this behavior so no need to do so.</div>
</div>
</div>
</blockquote>
<br>
If I was one of those people, I apologize but don't recall the
conversation. Was I?<br>
<br>
<blockquote
cite="mid:22636B3C-4309-4AD0-97CA-BFE200EAB808@kodewerk.com"
type="cite">
<div>
<div style="margin: 0px;">
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">My question is, can we get one of
these patches released so that we can correct this behavior?</div>
</div>
</div>
</blockquote>
Generally speaking we're not doing much work on CMS these days. We
are still accepting patches<br>
for improvements, of course.<br>
<br>
Jon<br>
<br>
<br>
<blockquote
cite="mid:22636B3C-4309-4AD0-97CA-BFE200EAB808@kodewerk.com"
type="cite">
<div>
<div style="margin: 0px;">
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">Kind regards,</div>
<div style="margin: 0px;">Kirk</div>
<div style="margin: 0px;"><br>
</div>
</div>
<div>
<div>On Mar 10, 2015, at 7:07 AM, Jon Masamitsu <<a
moz-do-not-send="true"
href="mailto:jon.masamitsu@oracle.com">jon.masamitsu@oracle.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000"> <br>
<div class="moz-cite-prefix">On 3/9/2015 10:39 PM, Jungwoo
Ha wrote:<br>
</div>
<blockquote
cite="mid:CA+n_jhjTTzW5FMxtnUfO3pOi8KNjNU4uYqN6w9QjAuS40w722g@mail.gmail.com"
type="cite">
<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>
</div>
</blockquote>
<br>
Do you use UsePSAdaptiveSurvivorSizePolicy to turn off the
<br>
survivor space resizing and tenuring threshold
adaptiveness<br>
for ParallelGC?<br>
<br>
Jon<br>
<br>
<blockquote
cite="mid:CA+n_jhjTTzW5FMxtnUfO3pOi8KNjNU4uYqN6w9QjAuS40w722g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>--Jungwoo</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
moz-do-not-send="true"
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
class=""><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 class="HOEnZb"><font color="#888888"><br>
<br>
Jon</font></span><span class=""><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
moz-do-not-send="true"
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>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>