JVM GC settings

Avoid optimising the Java Garbage Collector unless you have very specific performance model requirements that demand a specific GC, or if you have a known problem with the throughput or JVM pauses.

Class unloading



java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version 

Remember that JVM options change from time-to-time, so you’ll find that newer JVMs have additional facilities, may remove some options or slightly change their behaviour, or in some cases make them meaningless. One example that springs to mind is the MaxPermGen option and how it doesn’t relate to Java 8 which just gives an informational message that it’s not needed.