Setting heap size in Tomcat

I am working on apache tomcat server in unix environment. I want to increase the heap size of my application, so I install it in the catalina.sh file. This is how I do it ...

export CATALINA_OPTS = "- Xms1024m -Xmx1024m" echo $ CATALINA_OPTS

When I call startup.sh, it calls catalina.sh and sets the CATALINA_OPTS variable to 1024, as indicated in the echo statement in the script. But if I do echo $ CATALINA_OPTS on the command line, it will be empty. This is the expected behavior. How can I be sure that the correct heap value has indeed been raised?

+3
source share
2 answers

, $CATALINA_OPTS script, . , jmap, - 39196 - PID tomcat .

mpandit-mbp:~ mpandit$ jmap -heap 39196
Attaching to process ID 39196, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 19.1-b02-334

using parallel threads in the new generation.
using thread-local object allocation.
Concurrent Mark-Sweep GC

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize      = 132120576 (126.0MB)
   NewSize          = 21757952 (20.75MB)
   MaxNewSize       = 87228416 (83.1875MB)
   OldSize          = 65404928 (62.375MB)
   NewRatio         = 7
   SurvivorRatio    = 8
   PermSize         = 21757952 (20.75MB)
   MaxPermSize      = 85983232 (82.0MB)
+2

$ ps aux | grep tomcat , tomcat.

0

All Articles