Skip to content

Instantly share code, notes, and snippets.

@zafarella
Created August 9, 2013 00:06
Show Gist options
  • Save zafarella/6189995 to your computer and use it in GitHub Desktop.
Save zafarella/6189995 to your computer and use it in GitHub Desktop.
Tomcat jvm param with more aggressive GC and memory optimization. Use with caution on prod.
JAVA_OPTS="-Djava.awt.headless=true -Xmx7000M -Xms7000M -XX:MaxPermSize=768M -XX:PermSize=1024M -XX:MaxNewSize=1024M -XX:NewSize=768M -XX:SurvivorRatio=10 -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -verbose:gc -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"
@zafarella
Copy link
Author

export it at catalina.sh on linux for tomcat 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment