Tomcat - increase runtime memory and change GC (Garbage Collection) Algorithm Follow
Increasing the JVM memory allocation and thread stack size
Use one of the following procedures to increase the JVM memory allocation and thread stack size by using the Tomcat configuration tool or from the command line.
Note:
You must use the Tomcat configuration tool to configure these settings and restart Tomcat.
To increase the JVM memory allocation and thread stack size in the Tomcat configuration tool (Tomcat as a Service, on Windows)
- Right click on Apache Tomcat tray icon and stop the service (if running)
- Right click again on Apache Tomcat tray icon and click on Configure…
- Choose Java tab and increase the Initial memory pool and Maximum memory pool to the desired values.
To increase the JVM memory allocation and thread stack size for Tomcat from the command line (Windows)
- Stop the Tomcat (if running) by typing shutdown in the Tomcat bin directory (TomcatInstallDirectory/bin/shutdown.bat)
- Open the catalina.bat file located in the Tomcat bin directory (TomcatInstallDirectory/bin/catalina.bat) and add the following line (or the desired values):
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m
where:
- Xms is the initial (start) memory pool
- Xmx is the maximum memory pool
- Restart the Tomcat by typing startup in the Tomcat bin directory (TomcatInstallDirectory/bin/startup.bat)
To increase the JVM memory allocation and thread stack size for Tomcat (Linux)
- Stop the Tomcat (if running) by typing shutdown in the Tomcat bin directory
- Open the catalina.sh or startup.sh file (TomcatInstallDirectory/bin/catalina.sh)
-
Add the following line:
where:
- Xms is the initial (start) memory pool
- Xmx is the maximum memory pool
- Restart the Tomcat service by typing startup in the Tomcat bin directory
Memory Allocated to the server
You can also see the memory allocated to the server where AuraPlayer is deployed from the Service Manager, in: Admin -> Server Information -> Used/Total Memory:
Change GC (Garbage Collection) Algorithm for improved Performance on high load
If you have high load on the AuraPlayer server, you can improve the JVM performance by changing the GC Algorithm.
On the same location that you set the memory parameters add the following:
-XX:+UseSerialGC
For Example:
set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m -XX:+UseSerialGC
Comments
0 comments
Please sign in to leave a comment.