Tomcat Boot JVM parameter configuration

Source: Internet
Author: User
Tags garbage collection xms

Tomcat itself cannot run directly on the computer, and relies on a hardware-based operating system and a Java virtual machine. When the Java program starts, the JVM allocates an initial memory and maximum memory to the application. This initial memory and maximum internal presence will affect the performance of the program. For example, when the application uses the maximum memory, the JVM is going to do the garbage collection action, releasing some memory occupied. So when you want to adjust the initial and maximum memory for Tomcat startup, you need to declare to the JVM that normal Java programs can adjust the application's initial and maximum memory by-XMS-XMX in. Setting JVM Parameters

Under Windows, under $tomcat_home/bin/catalina.bat,linux, in front of $tomcat_home/bin/catalina.sh, add the following settings:

java_opts= "-xms [min heap Size]-xmx[max heap Size]"

For example:

Java_opts= "-xms1024m-xmx1024m-xx:permsize=128m-xx:maxpermsize=256m"

The specific JVM parameter values need to be configured & optimized according to the Web application, which is not covered here.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.