Any pointers for tuning 1.5.0_22 for a webapp with a large tenured gen?
Y. S. Ramakrishna
y.s.ramakrishna at oracle.com
Mon Jul 12 12:35:00 PDT 2010
>> I had the 1.4.2 tuned to the extreme:
>> JAVA_ARGS=-Xms2816m -Xmx2816m -XX:NewSize=384m -XX:MaxNewSize=384m -XX:CompileThreshold=3000 -Djava.net.setSoTimeout=20000 \
>> -XX:LargePageSizeInBytes=4m -XX:+UseMPSS -Xss128k -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled \
>> -Xnoclassgc -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=8 -XX:SurvivorRatio=6 -XX:+UseCMSCompactAtFullCollection -Xloggc:gc.out \
>> -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:MaxPermSize=92m
>> With our upgrade, the ergonomics of the application changed some, so I
>> just specified Xmx and Xms at 3GB, and let it run to see what
>> happened. Remarkably, things were actually pretty good - minor GC's
>> are faster, and major GC's only occur about once or twice an hour.
>> However, those major GC's are taking from 12-20seconds, which I can't
>> let our website users endure.
I understand you were getting the parallel throughput collector. Try
-XX:+UseParallelOldGC to do the mahor gc's multi-threaded and may
be that will suffice to get you within your GC pause threshold.
>> Before I go down the road of tuning things, does anyone have any tips
>> for me? I can afford at most 2 or 3 seconds of pause time at once,
>> and would prefer to keep it under 2 seconds if possible. I need the
>> 2GB of tenured to be able to cache all the objects that I need to
>> ensure good site performance.
>> The ergonomics look kinda cool, but I'm wondering if that large of
>> tenured generation + my low pause requirement is just too much to ask
>> from the throughput collector. Am I destined to go back to hand
>> tweaking the CMS collector?
If +UseParallelOldGC does not do the trick, you might have to do hand-tuning
using either the throughput collector, or use CMS, and tune it --
some amount of hand-tuning of young gen size, survivor sizes and max
tenuring thresholds is almost always necessary for CMS.
Look at the JavaOne talk last year by Charlie Hunt and Tony Printezis for more tips
(and/or attend the one they will be doing, i think, at the next JavaOne ;-).
More information about the hotspot-gc-use