CMS & DefaultMaxTenuringThreshold/SurvivorRatio

Jon Masamitsu Jon.Masamitsu at Sun.COM
Mon Jan 11 22:01:32 UTC 2010


Shaun Hennessy wrote On 01/11/10 13:09,:

> Alright I guess I am getting different behavior when I removed the
> parameters (and probably went from CMS-> Throughput).
>
> I now see with the parameters below, and with
> SurvivorRatio/MaxTenuringThreshold removed
> that I in fact get a SurvivorRatio of 6, and a MaxTenuringThreshold of
> 4.   Both of these seem to be static
> -- ie my Eden is staying at 3GB, my Survivor spaces at 0.5GB each, and
> PrintTenuringDistrubtion shows
> it at Max=4 - and nothing changes

>
> Will this always be the case (parameter won't change on the fly?) or
> is there some factor that will
> cause the JVM to change the parameters / I'm wondering why the
> Throughput collector seems to
> behave differently from CMS -- ie a different default
> MaxTenuringThreshold and the fact the memory
> pools seem to resize on the fly


Only the througput collector has GC ergonomics implemented.  That's
the feature that would vary eden vs survivor sizes and the tenuring
threshold.

>
> Also still curious if XX:ParallelGCThreads should be set to 16
> (#cpus)-- if my desire is to minimize time spent
> in STW GC time?


Yes 16 on average will minimize the STW GC pauses but occasionally
(pretty rare actually), there can be some interaction between the GC using
all the hardware threads and the OS needing one.

>  
> thanks,
> Shaun
>
>
>
>
> Shaun Hennessy wrote:
>
>> Hi,
>> Currently in java app we have the following settings applied, running
>> 6u12.
>>
>> *-*XX:+DisableExplicitGC
>> -XX:+UseConcMarkSweepGC
>> -XX:+UseParmNewGC
>> -XX:+CMSCompactAtFullCollection
>> -XX:+CMSClassUnloadingEnabled
>> -XX:+CMSInitatingOccupancyFractor=75
>> - PermSize/MaxPermSize=1GB
>> - Xms/Xms=16G
>> - NewSize/MaxNewSize=4GB
>> -XX:+SurvivorRatio=128
>>  -XX:+ MaxTenuringThreshold = 0
>>
>> So we are currently not using survivor space.   We are contemplating
>> using them now to hopefully lessen
>> the impacts of our major collections.   If I simply remove these 2
>> options, restart, query the jvm via jconsole I see the following
>> defaults.
>>
>> -XX:+SurvivorRatio=6
>> -XX:+MaxTenuringThreshold=15
>>
>> Are these settings actually being used CMS? - When watching jcsonole 
>> I see that our Eden and Survivor spaces
>> seem to frequently resize so I assume not or there must be another
>> parameter in play.
>> Will my MaxTenuringThreshold actually be 15?   Can this ever change
>> on the fly?
>>
>> One more thing -- can I believe the following as reported by jconsole
>> (running 6u12, 16 cpu box)
>> (I thought the formula was GCThreads=# of Cpus? )
>>
>> -XX:CMSParallelRemarkEnabled=true
>> -XX:UseBiasedLocking=true
>> -XX:CMSConcurrentMTEnabled=true
>> -XX:ParallelGCThreads=13
>> -XX:ParallelCMSThreads=4
>>
>> thanks,
>> Shaun
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>hotspot-gc-use mailing list
>>hotspot-gc-use at openjdk.java.net
>>http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>>  
>>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>hotspot-gc-use mailing list
>hotspot-gc-use at openjdk.java.net
>http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>  
>

_______________________________________________
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