eclipse.ini/myeclipse.ini -Xms,-Xmx,-PerSize

This afternoon, I checked some articles about optimizing the speed of MyEclipse, and benefited a lot. But if you know what it is, you have to know why it is. For example, when it comes to changes


Parameters in file-





What are these parameters?We have collected some information on the Internet, which is sorted out as follows:


This involves the memory management mechanism of the JVM.


1 . heap and non heap memory

According to the official statement: “the Java virtual machine has a heap, which is the runtime data area, from which the memory of all class instances and arrays is allocated. The heap is created when the Java virtual machine starts. ” In the JVM, memory outside the heap is called non heap memory. It can be seen that the JVM mainly manages two types of memory: heap and non heap. In short, heap is the memory available for Java code, which is reserved for developers; non heap is reserved for the JVM itself, so the method area, the memory required for internal processing or optimization of the JVM (such as JIT compiled code cache), each class structure (such as runtime constant pool, field and method data), and the code of method and construction method are all in non heap memory.

2. heap memory allocation

the initial allocated memory of the JVM is specified by – XMS, which is 1/64 of the physical memory by default; the maximum allocated memory of the JVM is specified by – Xmx, which is 1/4 of the physical memory by default. When the default free heap memory is less than 40%, the JVM will increase the maximum limit of heap up to – Xmx; when the free heap memory is more than 70%, the JVM will decrease the minimum limit of heap up to – XMS. Therefore, the server generally sets -Xms and -Xmx equal so as to avoid adjusting the heap size after each GC.

3. Non heap memory allocation

JVM uses – XX: permsize to set the initial value of non heap memory, which is 1/64 of physical memory by default; XX: maxpermsize to set the maximum size of non heap memory, which is 1/4 of physical memory by default.

4. JVM memory limit (maximum)

first, the JVM memory is limited to the actual maximum physical memory. Assuming that the physical memory is infinite, the maximum value of JVM memory has a great relationship with the operating system. In short, although the controllable memory space of 32-bit processor is 4GB, the specific operating system will give a limit, which is generally 2gb-3gb (generally speaking, it is 1.5G-2G under Windows system and 2g-3g under Linux system), and there will be no limit for processors with more than 64bit.


Give an example to illustrate the meaning:

– xms128m indicates that the minimum size of JVM heap (heap memory) is 128MB, which is initially allocated

– xmx512m indicates the maximum allowable size of JVM heap (heap memory) 256MB, which is allocated on demand.

Note: if – Xmx is not specified or specified too small, the application may cause java.lang.OutOfMemory Error. This error comes from the JVM. It is not throwable and cannot be caught with try… Catch.


Permsize and maxpermsize indicate that the virtual machine allocates memory limits for Java permanent generation objects such as class objects and method objects, which are not included in heap memory.

– XX: permsize = 64MB minimum size, initial allocation

– XX: maxpermsize = 256MB maximum allowable allocation size, on demand allocation

Too small can lead to: java.lang.OutOfMemoryError : PermGen space

The maxpermsize default value is related to the – server – client option. -Under the server option, the default maxpermsize is 64M

Under the – client option, the default maxpermsize is 32m



JDK garbage collection algorithms of different manufacturers are different. Under sun’s JDK, XMS is the same as Xmx, which can reduce the pressure of scaling heap size. But under IBM’s JDK, setting XMS to Xmx will also increase the probability of heap fragmentation.



Other parameters

5 – XX: + useparallelgc enables GC to execute faster. (it’s just a new parameter added to GC in JDK 5)

let’s sort it out again

The main methods to optimize the speed of MyEclipse are as follows:


1. Modification myeclipse.ini .
2. Cancel automatic validation
3. Check out useless plug-ins.
4. Modify the boot loading module


Similar Posts: