Passa ai contenuti principali

Post

Visualizzazione dei post con l'etichetta heap

How to configure Tomcat JVM parameters

How to increase JVM size in Tomcat In order to change the JVM heap size for Tomcat, we need to pickup the catalina.sh/catalina.bat file and modify the value for the JAVA_OPTS parameter. For example, suppose we want to change the max heap size from 256 MB to 512 MB while setting the Perm Gen = 256 MB. Here's how to modify the JAVA_OPTS : JAVA_OPTS= "-Xms128m -Xmx512m -XX:MaxPermSize=256m" The changes in the JVM settings will take effect on the server restart. You can verify the change done in the JVM parameter by running the jmap command that is part of the JDK distribution. This tool requires passing the processId of Tomcat. Example: C:\Users\tomcat>jmap -heap 3860 Attaching to process ID 3860, please wait... Debugger attached successfully. Server compiler detected. JVM version is 24.51-b03 using thread-local object allocation. Parallel GC with 4 thread(s) Heap Configuration:    MinHeapFreeRatio = 40    MaxHeapFreeRatio = 70    M...