PermGen elimination in JDK 8
I have installed JDK 8 and trying to run Eclipse. I am getting following warning message:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m;
support was removed in 8.0
What are the reasons of ignoring this argument?
This is one of the new features of Java 8, part of JDK Enhancement Proposals 122:
Remove the permanent generation from the Hotspot JVM and thus the need to tune the size of the permanent generation.
The list of all the JEPs that will be included in Java 8 can be found on the JDK8 milestones page.
Reasons of ignoring these argument is permanent generation has been removed in HotSpot for JDK8 because of following drawbacks
The Permanent Generation (PermGen) space has completely been removed and is kind of replaced by a new space called Metaspace. The consequences of the PermGen removal is that obviously the PermSize and MaxPermSize JVM arguments are ignored and you will never get a java.lang.OutOfMemoryError: PermGen error.
Advantages of MetaSpace
Metaspace Tuning
The maximum metaspace size can be set using the -XX:MaxMetaspaceSize flag, and the default is unlimited, which means that only your system memory is the limit. The -XX:MetaspaceSize tuning flag defines the initial size of metaspace If you don't specify this flag, the Metaspace will dynamically re-size depending of the application demand at runtime.
Change enables other optimizations and features in the future
There is improved GC performace also. More detail
The Permanent Generation (PermGen) space has completely been removed and is kind of replaced by a new space called Metaspace.The consequences of the PermGen removal is that obviously the PermSize and MaxPermSize JVM arguments are ignored and you will never get a java.lang.OutOfMemoryError
: PermGen error. The JDK 8 HotSpot JVM is now using native memory for the representation of class metadata and is called Metaspace. Read More>>
上一篇: XX:MaxPermSize有或没有
下一篇: 在JDK 8中删除PermGen