if the young generation is too small that it can't afford space for survivors and it have to throw them to old generation. and jvm found this, it will turn down <span class="Apple-style-span" style>TenuringThreshold ? </span><div>
<font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> I set </span></font><span class="Apple-style-span" style>TenuringThreshold to 10. and found that the full gc is less frequent and every full gc collect less garbage. it seems the parameter have the effect. But I found the load average is up and young gc time is much more than before. And the response time is also increased.</span></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> I guess that there are more objects in young generation. so it have to do more young gc. although they are garbage, it's not a good idea to collect them too early. because ParNewGC will stop the world, the response time is increasing.</span></font></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> So I adjust </span></font><span class="Apple-style-span" style>TenuringThreshold to 3 and there are no remarkable difference. </span></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> maybe I should use object pool for my application because it use many large temporary objects.</span></font></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> Another question, when my application runs for about 1-2 days. I found the response time increases. I guess it's the problem of large young generation.</span></font></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> in the beginning, the total memory usage is about 4-5GB and young generation is 100-200MB, the rest is old generation.</span></font></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> After running for days, the total memory usage is 8GB and young generation is about 2GB(I set new Ration 1:3)</span></font></div>
<div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"> I am curious about the heap size adjusting. I found </span></font><span class="Apple-style-span" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:22px">–XX:MinHeapFreeRation and </span>–XX:MaxHeapFreeRation</div>
<div> the default value is 40 and 70. the memory manage white paper says if the total heap free space is less than 40%, it will increase heap. if the free space is larger than 70%, it will decrease heap size.</div><div>
But why I see the young generation is 200mb while old is 4gb. does the adjustment of young related to old generation?</div><div> I read in <a href="http://www.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-1/">http://www.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-1/</a> young generation should be less than 512MB, is it correct?</div>
<div><br></div><div><font class="Apple-style-span" color="#222222" face="arial, sans-serif"><span class="Apple-style-span" style="font-size:22px"><br></span></font><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 1:23 AM, Srinivas Ramakrishna <span dir="ltr"><<a href="mailto:ysr1729@gmail.com">ysr1729@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I recommend Charlie's excellent book as well.<br><br>To answer yr question, yes, CMS + Parew does use MaxTenuringThreshold (henceforth MTT),<br>
but in order to allow objects to age you also need sufficiently large survivor spaces to hold<br>
them for however long you wish, otherwise the adaptive tenuring policy will adjust the<br>"current" tenuring threshold so as to prevent overflow. That may be what you saw.<br>Check out the info printed by +PrintTenuringThreshold.<br>
<br>-- ramki<br><br><div class="gmail_quote"><div><div class="h5">On Tue, Jan 10, 2012 at 1:31 AM, Li Li <span dir="ltr"><<a href="mailto:fancyerii@gmail.com" target="_blank">fancyerii@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
hi all<div> I have an application that generating many large objects and then discard them. I found that full gc can free memory from 70% to 40%. </div><div> I want to let this objects in young generation longer. I found -XX:MaxTenuringThreshold and -XX:PretenureSizeThreshold.</div>
<div> But I found a blog that says MaxTenuringThreshold is not used in ParNewGC.</div><div>And I use ParNewGC+CMS. I tried to set MaxTenuringThreshold=10, but it seems no difference.</div>
<br></div></div><div class="im">_______________________________________________<br>
hotspot-gc-use mailing list<br>
<a href="mailto:hotspot-gc-use@openjdk.java.net" target="_blank">hotspot-gc-use@openjdk.java.net</a><br>
<a href="http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use" target="_blank">http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br></div>