Configuring Tomcat memory utilization
Esta página aún no está disponible en tu idioma.
It’s also a good idea to configure the Tomcat memory utilization.
Edit the file $TOMCAT_HOME/bin/setenv.sh and edit the parameter JAVA_OPTS, where you can increase the system memory managed by the JVM (Java Virtual Machine).
OpenJDK 1.8
Section titled “OpenJDK 1.8”These are the default configuration file values. Tomcat will reserve 4096 MB (Xmx parameter), and the size of the heap since version 1.8 is dynamically assigned by the JVM. For this configuration, your server needs at least 5.5 GB of RAM (it is good practice to always leave 1 GB of free RAM for the OS).
JAVA_OPTS="$JAVA_OPTS -Xms256m -Xmx4096m -XX:+UseConcMarkSweepGC"JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Dlog4j.configuration=file://$CATALINA_HOME/conf/log4j.properties"JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Dmail.mime.ignoreunknownencoding=true"CATALINA_PID=$CATALINA_HOME/catalina.pidexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib/sigar