Oct 17 2014

Important Oracle Java Virtual Machine Information.

Posted by Mike Brunt at 7:23 PM Languages | Performance | Java-JVM | ColdFusion | JRun-J2EE

This past few days I have been at the Adobe ColdFusion Summit in Las Vegas; it has been great to meet with good friends again.  I was part of a Webapper team presenting here and I spoke on a beneficial set of JVM arguments for 64-bit environments which I evolved over a good number of years of tuning and testing the Sun then Oracle Java Virtual Machine (JVM).  I was surprised in the level of interest in the whole subject of JVM tuning after all the years I have been talking about it almost 14 years now.  In order to address some of the questions I was asked I thought it good to put some information together here; as follows.

Firstly those JVM argument settings, these are in addition to Xms Xmx and Permanent Generation memory settings.  Also please note that we changed the Garbage Collector to Concurrent Mark Sweep (CMS).

-XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -Xss256k -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68

One question I was asked here is if we garbage collection logging on for the JVM is there any way to rotate those logs and here is the answer to that...

-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=3 -XX:GCLogFileSize=256k -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:cfwhispererGC.log

I also found two very good resources with a list of JVM arguments as follows, firstly the Oracle 1.7 and previous JVM's

Next the new 1.8 JVM.

Lastly, I see in the new 1.8 JVM there is no Permanent Generation; more information on that soon.