Saturday, October 12, 2013

GC Parameters List

I am always on the lookout for common GC parameters. So I figured I'll compile a list of some of the common parameters and places where I found them:

Super Lists of All Parameters:
  1. http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html 
  2. http://stas-blogspot.blogspot.fi/2011/07/most-complete-list-of-xx-options-for.html
  3. http://blog.ragozin.info/2011/09/hotspot-jvm-garbage-collection-options.html
  4. http://reins.altervista.org/java/A_Collection_of_JVM_Options_MP.html 

Blog Roll
  • http://practicingtechie.wordpress.com/2013/06/15/java-vm-options/
    • -XX:+UseConcMarkSweepGC
    • -XX:+HeapDumpOnOutOfMemoryError
    • -XX:HeapDumpPath=$APP_HOME_DIR
    • -XX:OnOutOfMemoryError=
    • -XX:OnError=
    • -XX:+PrintGCDetails
    • -XX:+PrintGCTimeStamps
    • -Xloggc:$APP_HOME_DIR/gc.log
    • -XX:-UseGCLogFileRotation
    • -XX:GCLogFileSize=
    • -XX:NumberOfGCLogFiles=
  • http://forum.openspaces.org/thread.jspa?messageID=9277 
    • -Xms2g 
    • -Xmx2g 
    • -XX:+UseConcMarkSweepGC 
    • -XX:+CMSIncrementalMode 
    • -XX:+CMSIncrementalPacing 
    • -XX:CMSIncrementalDutyCycleMin=10 
    • -XX:CMSIncrementalDutyCycle=50 
    • -XX:ParallelGCThreads=8 
    • -XX:+UseParNewGC 
    • -Xmn150m 
    • -XX:MaxGCPauseMillis=2000 
    • -XX:GCTimeRatio=10 
    • -XX:+DisableExplicitGC 
  • http://java-is-the-new-c.blogspot.com/
    • -Xms11g 
    • -Xmx11g 
    • -verbose:gc 
    • -XX:-UseAdaptiveSizePolicy 
    • -XX:SurvivorRatio=12 
    • -XX:NewSize=100m 
    • -XX:MaxNewSize=100m 
    • -XX:MaxTenuringThreshold=2
  • http://blog.igorminar.com/2010/07/dgc-ii-jvm-tuning.html 
    • -XX:+UseConcMarkSweepGC
    • -XX:+UseParNewGC
    • -XX:CMSInitiatingOccupancyFraction=68
    • -XX:MaxTenuringThreshold=31
    • -XX:+CMSParallelRemarkEnabled
    • -XX:SurvivorRatio=6
    • -XX:TargetSurvivorRatio=90 
    • -XX:+AggressiveOpts
    • -XX:+DoEscapeAnalysis 
    • -Xloggc:/some/path/
    • -XX:+PrintGCDetails 
    • -XX:+PrintGCTimeStamps
    • -XX:+PrintGCDateStamps
    • -XX:+PrintTenuringDistribution
    • -XX:+HeapDumpOnOutOfMemoryError
    • -Xmn2818m 
  • http://blog.performize-it.com/2013/09/jvm-params-everyone-should-have-in.html
    • -Xms{#MB}m -Xmx{#MB}m
    • -XX:PermSize={#MB}m -XX:MaxPermSize={#MB}m
    • -XX:+HeapDumpOnOutOfMemoryError
    • -XX:+PrintFlagsFinal
    • -server
    • -XX:+PrintGCDetails
    • -XX:+PrintGCDateStamps 
    • -XX:+PrintTenuringDistribution 
    • -XX:+PrintGCApplicationStoppedTime 
    • -XX:+PrintGCApplicationConcurrentTime  
    • -XX:+UseGCLogFileRotation
    • -XX:NumberOfGCLogFiles={#files}
    • -XX:GCLogFileSize={#MB}M
    • -Xloggc:{some gc log file}.gc 
    • -Dcom.sun.management.jmxremote
    • -Dcom.sun.management.jmxremote.port={a port}
    • -Dcom.sun.management.jmxremote.authenticate=false
    • -Dcom.sun.management.jmxremote.authenticate=false
  • Big Bank System with a very large Heap (~80gb)
    • -d64
    • -server
    • -XX:+AggressiveOpts
    • -XX:+UseConcMarkSweepGC
    • -XX:+UseParNewGC
    • -XX:ParallelGCThreads=4
    • -XX:NewRatio=4
 Tools
  1. https://github.com/foursquare/heapaudit
  2. https://github.com/twitter/jvmgcprof
  3. https://github.com/Netflix/gcviz
  4. https://github.com/chewiebug/GCViewer

Tutorials
  1. http://www.slideshare.net/aszegedi/everything-i-ever-learned-about-jvm-performance-tuning-twitter
  2. http://java.dzone.com/articles/how-tame-java-gc-pauses
  3. http://blog.ragozin.info/p/garbage-collection.html
  4. http://blog.ragozin.info/2011/10/techtalk-garbage-collection-in-java.html
  5. https://blogs.oracle.com/jonthecollector/entry/the_second_most_important_gc
  6. http://stackoverflow.com/questions/17009961/understanding-the-java-memory-model-and-garbage-collection
  7. http://mechanical-sympathy.blogspot.com/2013/07/java-garbage-collection-distilled.html
  8. http://blog.mgm-tp.com/2013/03/garbage-collection-tuning/
  9. http://www.youtube.com/watch?v=o6qx_zvpOyI  
  10. http://www.infoq.com/presentations/Virtualizing-Tuning-JVM
  11. https://blog.codecentric.de/en/2013/10/useful-jvm-flags-part-7-cms-collector/
  12. http://blog.headius.com/2009/01/my-favorite-hotspot-jvm-flags.html 
  13. http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html
  14. http://java.dzone.com/articles/java-garbage-collection-0 

No comments: