Tomcat Settings java_opts

Source: Internet
Author: User
Tags xms

Java_opts, as the name implies, is a variable used to set JVM-related run parameters. In Tomcat, it is generally set in the $catalina_home/conf/ file, for example:

Java_opts= "-server-xms2048m-xmx2048m-xss512k-xx:permsize=128m-xx:maxpermsize=256m"

-server: Must be the first parameter, the performance is good on multiple CPUs
-xms: Initial heap size, minimum memory used, high CPU performance when this value should be larger
-xmx:java heap maximum, maximum memory used
The above two values are the minimum and maximum memory allocated for the JVM, depending on the size of the hardware physical memory, and are recommended to be half the physical memory.
-xx:permsize: Set a permanent storage area for memory
-xx:maxpermsize: Set a permanent save area for maximum memory
-XSS   This causes JBoss to consume 512K of memory as soon as each additional thread is added (thread), and the best value should be 128K, and the default value appears to be 512k. The
+xx:aggressiveheap will make XMS meaningless. This parameter allows the JVM to ignore the XMX parameter, frantically eating a g of physical memory, and then eating a G swap.
-XSS: Stack size per thread
-VERBOSE:GC actual garbage collection information
-xloggc:gc.log specify garbage collection log file
-xmn:young generation heap size, Typically set to one of 3, 4 of XMX
-XX:+USEPARNEWGC: Shorten the time collected by minor
-XX:+USECONCMARKSWEEPGC: Shorten the major collection time
The following gives the Java JVM in 1G memory environment The parameter Settings reference: java_opts= "-server-xms800m-xmx800m-xx:permsize=64m-xx:maxnewsize=256m-xx:maxpermsize=128m- Djava.awt.headless=true "

Tomcat Settings java_opts

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: 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.