Saturday, September 12, 2015

Useful JVM flags, revisited

This guy Patrick Peschlow (possibly a superhuman, a hero.... most likely a German, only Germans can love so much classifications) did an amazing job at illustrating all (most of) the JVM flags.
He explained it all in such a clear and precise way that I was about to cry for the emotion.

https://blog.codecentric.de/en/2012/07/useful-jvm-flags-part-1-jvm-types-and-compiler-modes/
  • server and -client
  • version and -showversion
  • -Xint, -Xcomp, and -Xmixed


https://blog.codecentric.de/en/2012/07/useful-jvm-flags-part-2-flag-categories-and-jit-compiler-diagnostics/
  • JVM flag categories
  • -XX:+PrintCompilation and -XX:+CITime
  • -XX:+UnlockExperimentalVMOptions
  • -XX:+LogCompilation and -XX:+PrintOptoAssembly


https://blog.codecentric.de/en/2012/07/useful-jvm-flags-part-3-printing-all-xx-flags-and-their-values/
  • -XX:+PrintFlagsFinal and -XX:+PrintFlagsInitial
  • -XX:+PrintCommandLineFlags


https://blog.codecentric.de/en/2012/07/useful-jvm-flags-part-4-heap-tuning/
  • -Xms and -Xmx (or: -XX:InitialHeapSize and -XX:MaxHeapSize)
  • -XX:+HeapDumpOnOutOfMemoryError and -XX:HeapDumpPath
  • -XX:OnOutOfMemoryError
  • -XX:PermSize and -XX:MaxPermSize
  • -XX:InitialCodeCacheSize and -XX:ReservedCodeCacheSize
  • -XX:+UseCodeCacheFlushing


https://blog.codecentric.de/en/2012/08/useful-jvm-flags-part-5-young-generation-garbage-collection/
  • -XX:NewSize and -XX:MaxNewSize
  • -XX:SurvivorRatio
  • -XX:+PrintTenuringDistribution
  • -XX:InitialTenuringThreshold, -XX:MaxTenuringThreshold and -XX:TargetSurvivorRatio
  • -XX:+NeverTenure and -XX:+AlwaysTenure


https://blog.codecentric.de/en/2013/01/useful-jvm-flags-part-6-throughput-collector/
  • Throughput vs. pause times
  • Garbage collection on the HotSpot JVM
  • -XX:+UseSerialGC
  • -XX:+UseParallelGC
  • -XX:+UseParallelOldGC
  • -XX:ParallelGCThreads
  • -XX:-UseAdaptiveSizePolicy
  • -XX:GCTimeRatio
  • -XX:MaxGCPauseMillis


https://blog.codecentric.de/en/2013/10/useful-jvm-flags-part-7-cms-collector/
  • -XX:+UseConcMarkSweepGC
  • -XX:+UseParNewGC
  • -XX:+CMSConcurrentMTEnabled
  • -XX:ConcGCThreads
  • -XX:CMSInitiatingOccupancyFraction
  • -XX+UseCMSInitiatingOccupancyOnly
  • -XX:+CMSClassUnloadingEnabled
  • -XX:+CMSIncrementalMode
  • -XX:+ExplicitGCInvokesConcurrent and -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
  • -XX:+DisableExplicitGC


https://blog.codecentric.de/en/2014/01/useful-jvm-flags-part-8-gc-logging/
  • -XX:+PrintGC
  • -XX:+PrintGCDetails
  • -XX:+PrintGCTimeStamps and -XX:+PrintGCDateStamps
  • -Xloggc


More References:

http://stas-blogspot.blogspot.de/2011/07/most-complete-list-of-xx-options-for.html

Virtual Machine Garbage Collection Tuning https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/



No comments: