Eclipse Memory Tuning-vmargs-xms128m-xmx512m-xx:permsize=64m-xx:maxpermsize=128m

Source: Internet
Author: User
Tags xms

1. What is the meaning of each parameter?
Parameter-vmargs means set JVM parameters, so the following are actually parameters of the JVM, we first look at the JVM memory management mechanism, and then explain the meaning of each parameter represents.
Heap (HEAP) and non-heap (non-heap) memory
According to the official statement: "Java virtual machines have a heap, the heap is the Run-time data region, all class instances and arrays of memory are allocated from here." The heap was created when the Java virtual machine was started. "" Memory outside the heap in the JVM is called Non heap memory (non-heap memory). You can see that the JVM mainly manages two types of memory: the heap and the non heap. Simply put, the heap is the memory that Java code can have, is reserved for developers, and not heaps are for the JVM to use, so the method area, JVM internal processing or tuning required memory (such as JIT-compiled code caching), each class structure (such as running a constant pool, field and method data) And the code for methods and construction methods are in non heap memory.
Heap memory allocation
The initial memory allocated by the JVM is specified by-XMS, and the default is physical memory 1/64;JVM the maximum allocated memory is specified by-XMX, which defaults to 1/4 of physical memory. When the default free heap memory is less than 40%, the JVM increases the maximum limit for the heap until-xmx, and when the free heap memory is greater than 70%, the JVM reduces the heap until the minimum limit of-XMS. Therefore, the server generally sets-xms and-xmx equal to avoid resizing the heap after each GC.
Non-heap memory allocation
The JVM uses-xx:permsize to set a non heap memory initial value, which defaults to 1/64 of physical memory, and the maximum amount of non heap memory is set by Xx:maxpermsize, which defaults to 1/4 of physical memory.
JVM memory limit (maximum)
First, JVM memory is limited to the actual maximum physical memory (nonsense.) Well, assuming that the physical memory is infinite, the maximum value of JVM memory is related to the operating system. To put it simply, the 32-bit processor, while the controllable memory space has 4GB, will give a limit to the specific operating system This limitation is generally 2GB-3GB (generally the Windows system under the 1.5g-2g,linux system is 2g-3g), and more than 64bit of processors will not be limited.

3. Other startup parameters. If you have a dual-core CPU, you may be able to try this parameter:

-xx:+useparallelgc

Allow the GC to execute faster. (only the newly added parameters to the GC in JDK 5)

Http://www.cnblogs.com/jamespangxh/archive/2010/10/13/1850133.html

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.