[Building Sakai] JVM settings when switching to Java 6

Earle Nietzel earle.nietzel at gmail.com
Mon Sep 12 09:04:10 PDT 2011


Hi Paul,

When we moved to Java 6 saw the same issues and it took a few weeks to get
the JVM tuned well again.

The options that made the must impact were:
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70
-XX:CMSIncrementalSafetyFactor=75
-XX:+UseCMSCompactAtFullCollection

We were suffering from heap fragmentation which is a well known problem
(something Java 7 G1 collector hopefully fixes)  so lowering the
CMSInitiatingOccupancy from 92% (the default) to 70% made a big difference.

Here is what we run with (runs great):

JAVA_OPTS="-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
-Dhttp.agent=Sakai -server -d64 -Djava.awt.headless=true
-Djava.library.path=/usr/lib -Dsun.net.inetaddr.ttl=60 -Xms5g -Xmx5g
-XX:NewSize=768m -XX:MaxNewSize=768m -XX:PermSize=512m -XX:MaxPermSize=512m
-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing
-XX:+CMSParallelRemarkEnabled -XX:+CMSConcurrentMTEnabled
-XX:ParallelGCThreads=5 -XX:+UseParNewGC -XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70 -XX:CMSIncrementalSafetyFactor=75
-XX:CMSMaxAbortablePrecleanTime=60000 -XX:+UseCMSCompactAtFullCollection
-XX:SurvivorRatio=6 -XX:+DisableExplicitGC"

Earle


On Mon, Sep 12, 2011 at 8:25 AM, Paul Dagnall <dagnalpb at notes.udayton.edu>wrote:

> Hi
> We just recently made the switch from Java 5 to 6. We have been noticing
> long pauses due to garbage collection that did not happen when we were still
> on Java 5. Did anybody also notice this and make some JVM tuning
> adjustments?
>
> We're running Sakai 2.6.x. Here are our current settings that worked well
> on Java 5:
>
> JAVA_OPTS="-server \
> -d64 \
> -Dsun.lang.ClassLoader.allowArraySyntax=true \
> -XX:+UseConcMarkSweepGC \
> -XX:+UseParNewGC \
> -XX:+CMSParallelRemarkEnabled \
> -Djava.awt.headless=true \
> -Xms6144m -Xmx6144m \
> -XX:NewSize=1024m \
> -XX:MaxNewSize=2048m \
> -XX:PermSize=512m -XX:MaxPermSize=512m \
> -Xloggc:/opt/sakai/gc_log/gc.log -XX:+PrintGCDetails
> -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime
> -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution \
> -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/sakai/gc_log \
> -Dcom.sun.management.jmxremote"
>
> Hopefully with the feedback from this I can make some additions to the confluence
> page on JVM Tuning<https://confluence.sakaiproject.org/display/DOC/Sakai+Admin+Guide+-+JVM+Tuning>.
> Right now, it's a little brief.
> Thank you!
>
> Paul Dagnall
> Application Developer & Administrator
> University of Dayton
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110912/06a087c0/attachment.html 


More information about the sakai-dev mailing list