Search code examples
javatomcatjmap

Want to confirm heap size that tomcat is using


I'm on ubuntu, and I need to confirm the heap size setting is being used by tomcat.

How can I do that?

I tried jmap but that doesn't seem to be on the server, can I download it individually somehow?


Solution

  • Heap size used by tomcat (as any other java app) is determined by jvm -Xmx param.

    So if your tomcat runs as a windows service, you would create environment variable CATALINA_OPTS=-Xms64m -Xmx256m.

    Then, look at the file tomcat-install/bin/catalina.sh (.bat) and startup.sh (.bat), and check param JAVA_OPTS -Xmx1024m or something similar.

    Good links: http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html http://www.coderanch.com/t/87422/Tomcat/increase-java-heap-size