Difference between revisions of "Memory settings"
Jump to navigation
Jump to search
old>Admin |
m (24 revisions imported) |
||
(20 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
* Minimum application memory is 512 MB | * Minimum application memory is 512 MB | ||
* Maximum application memory is 1 GB | * Maximum application memory is 1 GB | ||
Max total memory in this setup is 1280 MB which will work just fine in most cases | |||
-Xmx512m -Xms1024m -XX:MaxPermSize=256m | -Xmx512m -Xms1024m -XX:MaxPermSize=256m | ||
In very memory constrained environments (server <= 1GB) use the following settings, with a max use of 512 mB | |||
-Xmx384m -Xms384m -XX:PermSize=128m -XX:MaxPermSize=128m | |||
== Setting values in Tomcat / Windows == | == Setting values in Tomcat / Windows == | ||
=== Tomcat6 === | |||
The service can be changed by | |||
* Open prompt as '''Administrator''' | |||
* Run the following commands | |||
== Setting values in Tomcat / Linux == | cd "C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin | ||
Tomcat6w.exe //ES//tomcat6 | |||
* Klik "Java" page | |||
* Set the values | |||
** Initial memory pool (aka "Xms"): 512m | |||
** Maximum memory pool (aka "Xmx"): 1024m | |||
** Add an extra line to Java Options | |||
-XX:MaxPermSize=256m | |||
* Klik OK | |||
=== Tomcat7 === | |||
As Tomcat 6 except for step 2 | |||
cd "C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin | |||
Tomcat7w.exe //ES//tomcat7 | |||
See the visual guide here | |||
http://plavc.wordpress.com/2012/02/08/tomcat-service-on-windows/ | |||
=== Tomcat8 === | |||
As Tomcat 7 except for step 2 | |||
cd "C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin | |||
Tomcat8w.exe //ES//tomcat8 | |||
== Setting values in Tomcat 6 / Linux == | |||
Find '''catalina.sh''' in something like: '''/usr/share/tomcat6/bin''' | Find '''catalina.sh''' in something like: '''/usr/share/tomcat6/bin''' | ||
Line 19: | Line 57: | ||
JAVA_OPTS="-Djava.awt.headless=true -server -Xmx512m -Xms1024m -XX:MaxPermSize=256m" | JAVA_OPTS="-Djava.awt.headless=true -server -Xmx512m -Xms1024m -XX:MaxPermSize=256m" | ||
== Setting values in Tomcat 7 / Linux == | |||
sudo nano /etc/tomcat7/tomcat7.conf | |||
== Setting values in JBoss 7.x / Windows == | |||
# Edit [JBoss home]\bin\standalone.conf.bat | |||
# Ensure the following value is present | |||
set "JAVA_OPTS= -Xmx512m -Xms1024m -XX:MaxPermSize=256m" |
Latest revision as of 11:55, 10 December 2021
The following sample sets
- PermGen space is set to 256 MB
- Minimum application memory is 512 MB
- Maximum application memory is 1 GB
Max total memory in this setup is 1280 MB which will work just fine in most cases
-Xmx512m -Xms1024m -XX:MaxPermSize=256m
In very memory constrained environments (server <= 1GB) use the following settings, with a max use of 512 mB
-Xmx384m -Xms384m -XX:PermSize=128m -XX:MaxPermSize=128m
Setting values in Tomcat / Windows
Tomcat6
The service can be changed by
- Open prompt as Administrator
- Run the following commands
cd "C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin Tomcat6w.exe //ES//tomcat6
- Klik "Java" page
- Set the values
- Initial memory pool (aka "Xms"): 512m
- Maximum memory pool (aka "Xmx"): 1024m
- Add an extra line to Java Options
-XX:MaxPermSize=256m
- Klik OK
Tomcat7
As Tomcat 6 except for step 2
cd "C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin Tomcat7w.exe //ES//tomcat7
See the visual guide here
http://plavc.wordpress.com/2012/02/08/tomcat-service-on-windows/
Tomcat8
As Tomcat 7 except for step 2
cd "C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin Tomcat8w.exe //ES//tomcat8
Setting values in Tomcat 6 / 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"
Setting values in Tomcat 7 / Linux
sudo nano /etc/tomcat7/tomcat7.conf
Setting values in JBoss 7.x / Windows
- Edit [JBoss home]\bin\standalone.conf.bat
- Ensure the following value is present
set "JAVA_OPTS= -Xmx512m -Xms1024m -XX:MaxPermSize=256m"