tomcat/bin catalina.sh
JAVA_OPTS='-server -Xms4g -Xmx4g -Xss256k -XX:PermSize=512m -XX:MaxPermSize=1024m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$CATALINA_BASE/logs/gc.log -XX:OnOutOfMemoryError="kill -9 %p" -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:InitiatingHeapOccupancyPercent=70'