MaxTenuringThreshold available in ParNewGC?

Li Li fancyerii at gmail.com
Wed Jan 11 04:45:21 UTC 2012


  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 TenuringThreshold ?
   I set 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.
   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.
   So I adjust TenuringThreshold to 3 and there are no remarkable
difference.
   maybe I should use object pool for my application because it use many
large temporary objects.
   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.
    in the beginning, the total memory usage is about 4-5GB and young
generation is 100-200MB, the rest is old generation.
    After running for days, the total memory usage is 8GB and young
generation is about 2GB(I set new Ration 1:3)
    I am curious about the heap size adjusting. I found –XX:MinHeapFreeRation
and –XX:MaxHeapFreeRation
   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.
   But why I see the young generation is 200mb while old is 4gb. does the
adjustment of young related to old generation?
   I read in
http://www.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-1/
young
generation should be less than 512MB, is it correct?



On Wed, Jan 11, 2012 at 1:23 AM, Srinivas Ramakrishna <ysr1729 at gmail.com>wrote:

> I recommend Charlie's excellent book as well.
>
> To answer yr question, yes, CMS + Parew does use MaxTenuringThreshold
> (henceforth MTT),
> but in order to allow objects to age you also need sufficiently large
> survivor spaces to hold
> them for however long you wish, otherwise the adaptive tenuring policy
> will adjust the
> "current" tenuring threshold so as to prevent overflow. That may be what
> you saw.
> Check out the info printed by +PrintTenuringThreshold.
>
> -- ramki
>
> On Tue, Jan 10, 2012 at 1:31 AM, Li Li <fancyerii at gmail.com> wrote:
>
>> hi all
>>    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%.
>>    I want to let this objects in young generation longer. I found
>> -XX:MaxTenuringThreshold and -XX:PretenureSizeThreshold.
>>    But I found a blog that says MaxTenuringThreshold is not used in
>> ParNewGC.
>> And I use ParNewGC+CMS. I tried to set MaxTenuringThreshold=10, but it
>> seems no difference.
>>
>> _______________________________________________
>> hotspot-gc-use mailing list
>> hotspot-gc-use at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20120111/86b651b6/attachment.htm>
-------------- next part --------------
_______________________________________________
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-dev mailing list