Trying to bump up tenuring threshold - failing

Charlie Hunt chunt at salesforce.com
Thu Jun 28 13:20:48 PDT 2012


Add -XX:-UseAdaptiveSizePolicy, and then start tweaking SurvivorRatio and NewSize & MaxNewSize.

Default behavior for Parallel GC is to use adaptive sizing which will honor your NewSize & MaxNewSize but ignore your SurvivorRatio.

> Application time: 78.8894050 seconds

That the amount of time your application has run since the last stop the world event.

You might find the step-by-step tuning info (and other stuff) in Java Performance [1] useful. ;-)

hths,

charlie ...

[1]: http://www.amazon.com/Java-Performance-Charlie-Hunt/dp/0137142528

On Jun 28, 2012, at 12:13 PM, Kobe Bryant wrote:

> I am using oracle jdk 1.6 (latest build) in 64 bit mode. The system enocuntering
> too much promotions out of young gen; this makes tenuring threshold 1.
> 
> So I thought i must increase young gen size. I did incrementally from 2GB heap to 3GB heap
> and with each increment I increase young gen size progressively:
> 
> 
> export MEMORY_OPTIONS="-Xmx3g -Xms3g" -XX:MaxNewSize=830m -XX:NewSize=830m -XX:SurvivorRatio=6 -XX:PermSize=764m -XX:MaxPermSize=764m"
> export ADDITIONAL_GC_OPTIONS="-XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintAdaptiveSizePolicy -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime"
> export GC_OPTIONS="-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -Xloggc:log34221.log -XX:+DisableExplicitGC ${ADDITIONAL_GC_OPTIONS}"
> 
> 
> But tenuring threshold start at 7 and then go to 1:
>    $ grep "new threshold" log34421.log
>    Desired survivor size 108789760 bytes, new threshold 7 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 7 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 6 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 5 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 4 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 3 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 2 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 1 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 1 (max 15)
>    Desired survivor size 108789760 bytes, new threshold 1 (max 15)
>    ...
> 
> How do I keep tenuring threshold at 3 or 4?
> 
> Also, in one iteration, the application stop time due to gc is listed as 
>           Application time: 78.8894050 seconds
> 
> This mean that GC threads suspended appliction threads for 78s??
> 
> A section of log shown here:
> 
> {Heap before GC invocations=1878 (full 22):
>  PSYoungGen      total 743680K, used 741582K [0x00000007cc200000, 0x0000000800000000, 0x0000000800000000)
>   eden space 637440K, 100% used [0x00000007cc200000,0x00000007f3080000,0x00000007f3080000)
>   from space 106240K, 98% used [0x00000007f3080000,0x00000007f96338c0,0x00000007f9840000)
>   to   space 106240K, 0% used [0x00000007f9840000,0x00000007f9840000,0x0000000800000000)
>  PSOldGen        total 2295808K, used 2071638K [0x0000000740000000, 0x00000007cc200000, 0x00000007cc200000)
>   object space 2295808K, 90% used [0x0000000740000000,0x00000007be715978,0x00000007cc200000)
>  PSPermGen       total 782336K, used 544637K [0x0000000710400000, 0x0000000740000000, 0x0000000740000000)
>   object space 782336K, 69% used [0x0000000710400000,0x00000007317df490,0x0000000740000000)
> 2012-06-28T14:39:55.640-0400: 131078.967: [GCAdaptiveSizePolicy::compute_survivor_space_size_and_thresh:  survived: 78129760  promoted: 13171824  overflow: falseAdaptiveSizeStart: 131079.039 collection: 1878
>   avg_survived_padded_avg: 158664864.000000  avg_promoted_padded_avg: 30081980.000000  avg_pretenured_padded_avg: 0.000000  tenuring_thresh: 1  target_size: 108789760
> Desired survivor size 108789760 bytes, new threshold 1 (max 15)
> PSAdaptiveSizePolicy::compute_generation_free_space: costs minor_time: 0.001379 major_cost: 0.000657 mutator_cost: 0.997964 throughput_goal: 0.990000 live_space: 2181788672 free_space: 1291321344 old_promo_size: 654835712 old_eden_size: 636485632 desired_promo_size: 654835712 desired_eden_size: 636485632
> AdaptiveSizePolicy::survivor space sizes: collection: 1878 (108789760, 108789760) -> (108789760, 108789760)
> AdaptiveSizeStop: collection: 1878
>  [PSYoungGen: 741582K->76298K(743680K)] 2813220K->2160800K(3039488K), 0.0723130 secs] [Times: user=0.27 sys=0.00, real=0.07 secs]
> Heap after GC invocations=1878 (full 22):
>  PSYoungGen      total 743680K, used 76298K [0x00000007cc200000, 0x0000000800000000, 0x0000000800000000)
>   eden space 637440K, 0% used [0x00000007cc200000,0x00000007cc200000,0x00000007f3080000)
>   from space 106240K, 71% used [0x00000007f9840000,0x00000007fe2c2a60,0x0000000800000000)
>   to   space 106240K, 0% used [0x00000007f3080000,0x00000007f3080000,0x00000007f9840000)
>  PSOldGen        total 2295808K, used 2084501K [0x0000000740000000, 0x00000007cc200000, 0x00000007cc200000)
>   object space 2295808K, 90% used [0x0000000740000000,0x00000007bf3a55e8,0x00000007cc200000)
>  PSPermGen       total 782336K, used 544637K [0x0000000710400000, 0x0000000740000000, 0x0000000740000000)
>   object space 782336K, 69% used [0x0000000710400000,0x00000007317df490,0x0000000740000000)
> }
> Total time for which application threads were stopped: 0.0763960 seconds
> Application time: 78.8894050 seconds
> 
> thank,
> 
> /kobe
> _______________________________________________
> 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-use mailing list