Setting java opts
For windows Java_opts setup in environmental variables:-
Recommended for small instance(1.7gb ram):-
-Xms512m -Xmx512m -XX:MaxPermSize=256m
Recommended for small instance(1.7gb ram):-
-Xms1024m -Xmx1024m -XX:MaxPermSize=512m
Recommended for large instance(8gb ram):-
-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
For Ubuntu:- In Ubuntu, go to
tomcat/bin path:
ex: cd /usr/share/tomcat7/bin
create setenv shell script :
ex: sudo nano setenv.sh
Copy and paste below content into it:
Recommended for small instance(1.7gb ram):-
export JAVA_OPTS="$JAVA_OPTS\
-server\
-Xms512m\
-Xmx512m
-XX:+HeapDumpOnOutOfMemoryError\
-XX:MaxPermSize=256m"
Recommended for medium instance(3.75gb ram):-
export JAVA_OPTS="$JAVA_OPTS\
-server\
-Xms1024m\
-Xmx1024m
-XX:+HeapDumpOnOutOfMemoryError\
-XX:MaxPermSize=512m"
Recommended for large instance(8gb ram):-
export JAVA_OPTS="$JAVA_OPTS\
-server\
-Xms2048m\
-Xmx2048m
-XX:+HeapDumpOnOutOfMemoryError\
-XX:MaxPermSize=1024m"