Tomcat startup Parameters Xms, Xmx, Xx:maxnewsize, Xx:permsize,-xx:maxpermsize, Djava.awt.headless

Source: Internet
Author: User
Tags xms

Add #!/bin/sh under the first line of tomcat/bin/catalina.sh

java_opts="-server-xms512m-xmx1024m  -xx:maxnewsize=512m-xx:permsize=128m-xx:maxpermsize=256m- Djava.awt.headless=true"

-xms256m JVM Initial allocation of heap memory, production environment is recommended to xmx the same, set to more than 1024m
-XMX512M JVM Maximum allowable allocated heap memory, production environment is recommended to set above 1024m
-xx:permsize=64m JVM Initial allocation of non-heap memory, will not be recycled, production environment is recommended to the same as MaxPermSize, set to more than 256m
-xx:maxnewsize=512m JVM Heap Area The maximum assignable size of Cenozoic memory (PermSize is not a heap), production environment is recommended to be set to 800m-1024m
-xx:maxpermsize=128m JVM Maximum allowable allocated non-heap memory, production environment recommended set to 256m or more
Maximum heap memory and maximum non-heap memory are limited by the operating system

About-djava.awt.headless=true

For a Java server, some graphical elements, such as map creation or graphics and graphs, are often processed. These APIs basically always need to run a x-server in order to be able to use the AWT (abstract window Toolkit, abstracted Windows toolset). However, running an unnecessary x-server is not a good way to manage your network.
This solution depends on your Java version. If you run on JDK1.4, then you will have the opportunity to run the headless server.
-djava.awt.headless=true
For JDK1.3 and lower versions, there is a PJA toolkit from Eteks (pure Java AWT Toolkit, the plain Java AWT toolset) that can be used. It is a Headlessjava server that is configured to be very similar to Sun's version 1.4, and this configuration includes a set of-D attribute flags. Otherwise it will be reported
Can ' t connect to X11 Window server using ': 0.0′as the value of the DISPLAY variable
Abnormal

Tomcat startup Parameters Xms, Xmx, Xx:maxnewsize, Xx:permsize,-xx:maxpermsize, Djava.awt.headless

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.