eclipse.ini memory settings
-vmargs-Xms128M-Xmx512M-XX: PermSize = 64M-XX: MaxPermSize = 128M
There are several questions:
1. What is the meaning of each parameter?
2. Why are some machines I will be-Xmx and-XX: MaxPermSize is set to
512M can start after the Eclipse, and some machines can not start?
3. Why the above parameters are written to the eclipse.ini file failed to implement the corresponding Eclipse settings?
Here we have been able to answer
1. What is the meaning of each parameter?
Parameter-vmargs means is to set JVM parameters, so the back of which
are the parameters of the JVM, we first look at JVM memory management
mechanism, and then explain the meaning of each parameter
representative.
Heap (Heap) and non-heap (Non-heap) memory
In accordance with the official statement: Java virtual machine has a
heap, the heap is the runtime data area, all the class instances and an
array of memory are allocated from here. Heap is a Java virtual machine
startup created. Outside of the heap in the JVM memory is called
non-heap memory (Non-heap memory). JVM key management can be seen that
two types of memory: heap and non-heap. To put it simply is the Java
code could be in the heap and the memory is reserved for developers to
use; non-heap is the JVM to use for themselves, so methods that, JVM
required for internal processing or optimization of memory (such as JIT
compiled code cache), each class structure (such as run from time to
time the number of pools, fields and methods of data), as well as
method and constructor code in the non-heap memory.
Heap memory allocation
JVM initial allocation of memory specified by-Xms, the default is the
physical memory of 1 / 64; JVM maximum allocation of memory by the-Xmx
specified, the default is the physical memory 1 / 4. Default spare less
than 40% of heap memory, JVM heap will be increased until the
maximum-Xmx limits; spare more than 70% of heap memory, JVM heap will
be reduced until the minimum-Xms restrictions. Therefore, the general
set up a server-Xms,-Xmx equal in order to avoid adjustments after each
GC heap size.
Non-heap memory allocation
JVM using
the-XX: PermSize to set the initial value of non-heap memory, the
default is the physical memory of 1 / 64; by XX: MaxPermSize set the
maximum size of non-heap memory, the default is the physical memory of
1 / 4.
JVM memory limit (max)
First of all JVM
memory limit the actual maximum physical memory (nonsense! Hehe),
assuming infinite physical memory, then, JVM memory, the maximum value
of a great relationship with the operating system. Simply put, the
32-bit processors, although the controlled memory space is 4GB, but
will give a specific operating system restrictions, this limit is
generally 2GB-3GB (generally Windows systems under 1.5G-2G, Linux
system under 2G-3G), while the 64bit processor, there will be no more
than limited.
2. Why are some machines I will be-Xmx and-XX:
MaxPermSize is set to 512M can start after the Eclipse, and some
machines can not start?
JVM memory management through the
introduction of the face that we have learned that contains two kinds
of JVM memory: heap memory and non-heap memory, another JVM maximum
memory depends primarily on the actual physical memory and operating
system. So set the VM parameters causes the program to fail to start
mainly for the following reasons:
1) the value of-Xms parameter is greater than-Xmx, or-XX: PermSize is greater than the value of-XX: MaxPermSize;
2)-Xmx values and-XX: MaxPermSize more than the sum of the maximum JVM
memory limits, such as the current operating system, the maximum memory
limit, or the actual physical memory and so on. Talking about the
actual physical memory are required at this point is, if your memory is
1024MB, but it is not used in the actual system may be 1024MB, because
it occupied in part by the hardware.
3. Why the above parameters are written to the eclipse.ini file failed to implement the corresponding Eclipse settings?
So why the same parameters in the shortcut or the command line
effectively in the eclipse.ini document is invalid it? This is because
we do not have to comply with the rules set eclipse.ini file:
Parameters of the value of this form is shaped like a key in the middle
there is a space to change their line of writing, if the value has
spaces in double quotes, including the need to use them. For instance,
we use the-vm C: Javajre1.6.0binjavaw.exe parameter is set to the
virtual machine, in the eclipse.ini document should be rewritten like
this: -vm
C:Javajre1.6.0binjavaw.exe
In accordance with the above mentioned, the final parameters eclipse.ini can be written like this: -vmargs
-Xms128M
-Xmx512M
-XX:PermSize=64M
-XX:MaxPermSize=128M
Actual results can be run through the Eclipse in the Help-About Eclipse
SDK window inside the Configuration Details button to view it.
Also must be explained, Eclipse comes with eclipse.ini compressed package contents of the file like this: -showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m
One launcher.XXMaxPermSize (Note that the top of the two connecting
lines) with the-XX: MaxPermSize parameter is basically the same
meaning, I think the only difference is that the former is the time to
start eclipse.exe set the parameters, which is the eclipse used by the
JVM parameters. In fact, you can set up a two, so there can be
launcher.XXMaxPermSize and the next line to use # comment.
3. Other startup parameters. If you have a dual-core CPU, may be able to try this parameter: -XX:+UseParallelGC
Let GC faster implementation. (Only JDK 5 years of GC additional parameters)
eclipse.ini memory settings
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.