New MaxMetaspaceSize option for trunk (Java 8)

509 views
Skip to first unread message

Matthew Jones

unread,
Apr 21, 2015, 10:10:10 AM4/21/15
to sakai-dev
If you're running java 8 you'll notice 2 new warnings about PermGen. This was changed in java 8 to a new area called Metaspace and there's a lot of side reading if you're interested about this. [1] [2] It seems to be managed a lot better than Permgen was but still should probably be capped if you were setting a MaxPermSize previously

For instance if you had
-XX:MaxPermSize=512m -XX:PermSize=64m

Then use the new Java 8 option:
-XX:MaxMetaspaceSize=512m

Otherwise you'll be using more memory than before and still could run OOM somewhere. We'll update the docs for 11 after some testing.

I had to just restart nightlies as they were missing these options and using twice the memory as before.

Mustansar Mehmood

unread,
Apr 23, 2015, 9:25:52 AM4/23/15
to saka...@apereo.org
I have been using these options for JDK7
JAVA_OPTS="-server  -d64 -XX:+UseParNewGC  -Xmx2048m -XX:MaxPermSize=1024m -Dorg.apache.jasper.compiler.Parser.STRICT_WHITESPACE=false -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dsun.lang.ClassLoader.allowArraySyntax=true -Dsakai.demo=true"

Does anyone know how would these options can be revised to for using JDK8?
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+...@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at http://groups.google.com/a/apereo.org/group/sakai-dev/.


-- 
Mustansar Mehmood
Educational System Developer

Office of Information Technology  
6100 Main St. MS 119
Houston Texas 77005

Phone:(713)348-2523
Fax  :(713)348 6099 
email:must...@rice.edu





I have yet to see any problem, however complicated, which, when,you  looked at it in the right way, did not become still more complicated. 
    -- Poul Anderson 

Matthew Jones

unread,
Apr 23, 2015, 9:38:34 AM4/23/15
to Mustansar Mehmood, sakai-dev
Change -XX:MaxPermSize=1024m to -XX:MaxMetaspaceSize =1024m

-Dsun.lang.ClassLoader.allowArraySyntax=true is no longer needed since 2.9 (SAK-16745)
-Dorg.apache.jasper.compiler.Parser.STRICT_WHITESPACE is no longer needed since 2.9 (SAK-21265)
-Djava.util.Arrays.useLegacyMergeSort is no longer needed with Java 8 (This was needed in 7 to avoid some errors but not in your string)

I believe  -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false is still required.

On the trunk nightly currently we have (It helps for shutdown if you split up the java and catalina opts appropriately)

JAVA_HOME=/usr/lib/jvm/java-8-oracle/
CATALINA_HOME=/var/tomcats/apache-tomcat-8.0.21
CATALINA_BASE=/var/trunk-oracle
CATALINA_PID=/tmp/trunk-oracle.pid

JAVA_OPTS="-Dhttp.agent=Sakai -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsakai.demo=true"

CATALINA_OPTS="-d64 -Xms1512m -Xmx1512m -XX:NewSize=256m -XX:MaxMetaspaceSize=512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Dsakai.cookieName=SAKAIID
 -Dcom.sun.management.jmxremote.port=15555 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.library.path=/var/tomcats/natives/lib/"


Reply all
Reply to author
Forward
0 new messages