Java Learning Java Virtual machine memory configuration,-xss256m-xms512m-xmx800m-xx:maxpermsize=512m

Source: Internet
Author: User
Tags garbage collection server memory tomcat server

Turn from: 39048737

Configure XMS, XMX, PermSize, MaxPermSize in the Tomcat server memory size

Turn from: 52938043

A Java Virtual machine memory configuration:

(1) Operation: project name (e.g. CK02) right-click (select option Properties)->run/debug settings-> Select the program you want to execute (for example: Launch), tap (edit. ), select (x) =arguments under VM arguments as:

-xmx1024m-xms512m-xx:maxpermsize=256m

(2) Parameter analysis:

-xmx1024m: Sets the maximum available memory for the JVM to 1024M.

-XMS512M: Virtual machine occupies the minimum memory of the system. This value can be set to the same as-xmx to avoid the JVM reallocating memory after each garbage collection completes.

-xx:maxpermsize: Maximum heap size. This is also appropriate, so if there is a problem, first please adjust the –xms512m: set it smaller, OK.

Note: Do not write incorrectly when configuring the character, otherwise it may cause the MYECLIPSE environment not to run the Java program.

Two Eclipse Memory Configuration:

(1) Configuration method:

There is a Eclipse.ini file under the Eclipse file, configured as:

-xmx1024m-xms512m–xx:permsize=64m-xx:maxpermsize=256m

-xx:permsize: Minimum heap size. Generally reported insufficient memory, are said that this is too small, heap space remaining less than 5% will be warned, it is recommended to set this slightly larger, but depending on the size of the machine memory to be installed, but not more than MaxPermSize.

(2) Looking for Eclipse.ini files:

Click "Start" Search: Eclipse.ini
Three. You can also write the above configuration in the Xx.bat file to run the program.

Java Learning Java Virtual machine memory configuration,-xss256m-xms512m-xmx800m-xx:maxpermsize=512m

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.