Skip to content

Instantly share code, notes, and snippets.

@JasonGiedymin
Created April 17, 2012 17:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JasonGiedymin/2407715 to your computer and use it in GitHub Desktop.
Save JasonGiedymin/2407715 to your computer and use it in GitHub Desktop.
JVM Performance Tuning
# Jason Giedymin
# jasong _-@-_ apache _dot_ org
# Try these options for your 64bit JVM.
# Aggressive collection, Large-ish Memory footprint
-Xss1024k -Xms512m -Xmx1408m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=1024m -XX:+AggressiveOpts -XX:ParallelGCThreads=16 -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
# Aggressive collection but use memory if needed
-Xss1024k -Xms128m -Xmx1408m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=1024m -XX:+AggressiveOpts -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
# Experimental - JDK and sysctl edits required
-Xss1024k -Xms8192m -Xmx40960m -XX:MaxPermSize=8192m -XX:ReservedCodeCacheSize=4096m -XX:+AggressiveOpts -XX:ParallelGCThreads=24 -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
## Try these if your messing with the JDK (experimental)....
# Aggressive collection, Large-ish Memory footprint
-Xss1024k -Xms512m -Xmx1408m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=1024m -XX:+AggressiveOpts -XX:ParallelGCThreads=16 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
# Aggressive collection but use memory if needed
-Xss1024k -Xms128m -Xmx1408m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=1024m -XX:+AggressiveOpts -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
# Experimental - JDK and sysctl edits required
-Xss1024k -Xms8192m -Xmx40960m -XX:MaxPermSize=8192m -XX:ReservedCodeCacheSize=4096m -XX:+AggressiveOpts -XX:ParallelGCThreads=24 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:+UseCompressedOops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment