This is cheat sheet regarding JAVA memory tunning.
Please refer to <
How to Tune Java Garbage Collection> for details.
JVM Memory Tuning parameters
Parameter | Description |
-Xms1000m | Heap area size when starting JVM |
-Xmx1000m | Maximum heap area size |
-XX:NewRatio=2 | Ratio of New area and Old area |
-XX:NewSize=1000000 | New area size |
-XX:SurvivorRatio=2 | Ratio of Eden area and Survivor area |
-XX:PermSize=1000000 | Permanent area size |
-XX:MaxPermSize=1000000 | Max permanent area size |
-XX:+HeapDumpOnOutOfMemoryError | Create heap dump on OOM error |
-XX:HeapDumpPath=/tmp/a.log | Heap dump location. |
-XX:OnOutOfMemoryError=/killparent.sh | Actions after an OOM occurs. |
Enable Verbose GC log
Parameter | Description |
-verbose:gc | Print each GC. |
-XX:+PrintGCDetails | Print additional information. |
-Xloggc:/tmp/gc.log | Log location of GC |
-XX:+PrintGCTimeStamps | Add a time stamp at the start of each collection. |
No comments:
Post a Comment