Difference between revisions of "Memory settings"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
old>Admin
Line 9: Line 9:


== Setting values in Tomcat / Windows ==
== Setting values in Tomcat / Windows ==
In the service change the execution to
In the service manager change the call to Tomcat.exe to


  tomcat7.exe //US//[name of your tomcat service] --JvmOptions=-Xmx2g -Xms1g -XX:MaxPermSize=512m
      [path to tomcat]\tomcat[version].exe //[letters]//[name of service] --JvmOptions=-Xmx512m -Xms1024m -XX:MaxPermSize=256m
 
=== Tomcat6 ===
The service can be changed by
# Open prompt
# Run the following commands
 
  cd "C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
  tomcat6.exe //RS//tomcat6 --JvmOptions=-Xmx512m -Xms1024m -XX:MaxPermSize=256m
 
 
=== Tomcat7 ===
Use this guide
 
http://plavc.wordpress.com/2012/02/08/tomcat-service-on-windows/


== Setting values in Tomcat / Linux ==
== Setting values in Tomcat / Linux ==

Revision as of 12:20, 1 March 2013

The following sample sets

  • PermGen space is set to 256 MB
  • Minimum application memory is 512 MB
  • Maximum application memory is 1 GB
-Xmx512m -Xms1024m -XX:MaxPermSize=256m

Max total memory in this setup is 1256 MB

Setting values in Tomcat / Windows

In the service manager change the call to Tomcat.exe to

     [path to tomcat]\tomcat[version].exe //[letters]//[name of service] --JvmOptions=-Xmx512m -Xms1024m -XX:MaxPermSize=256m

Tomcat6

The service can be changed by

  1. Open prompt
  2. Run the following commands
  cd "C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
  tomcat6.exe //RS//tomcat6 --JvmOptions=-Xmx512m -Xms1024m -XX:MaxPermSize=256m


Tomcat7

Use this guide

http://plavc.wordpress.com/2012/02/08/tomcat-service-on-windows/

Setting values in Tomcat / Linux

Find catalina.sh in something like: /usr/share/tomcat6/bin

Assign following line to JAVA_OPTS variable and add it into catalina.sh file.

 JAVA_OPTS="-Djava.awt.headless=true -server -Xmx512m -Xms1024m -XX:MaxPermSize=256m"