Translation Https://blogs.oracle.com/poonam/entry/about_g1_garbage_collector_permanent G1 garbage collection permanent generation and Metaspace JDK7: Permanent Generation
In JDK7, the permanent generation persists, only to remove part of the content at this time the symbolic reference (symbols) is moved to the native heap; The literal amount (interned strings) moves to the Java heap; The static variable (class statics) of the class is moved to the Java heap. Jdk7:g1 and permanent generation
For G1, the permanent generation is only reclaimed by the full GC. G1 only calls the full GC,FULLGC in two cases is the Stop-the-world (STW) GC. Permanently over the application allocates memory faster than G1 concurrent collection (concurrently collect garbage)
For CMS, you can use the-xx:+cmsclassunloadingenabled option to collect in the CMS concurrency loop (concurrent cycle), which differs from G1, G1 only in full Stop-the-world (STW) GC is collected.
We can use the-xx:permsize and-xx:maxpermsize options to set the size of the permanent generation and the maximum value for the permanent generation, respectively. JDK8: Permanent Generation
The permanent generation has been completely removed from the JDK8. The-xx:permsize and-xx:maxpermsize options are ignored. JDK8: Meta space (metaspace)
The metadata for the class (classes metadata), which is stored in the local heap (native heap), is called Metaspace. Also adds new flag-xx:metaspacesize initialization dimensions for metaspace (default 12Mbytes on 32bit client VM and 16Mbytes in 32bit server VM, in 64bit Bigger on the VM)-xx:maxmetaspacesize the maximum size of the dimension (default local memory)-xx:minmetaspacefreeratio the minimum rate of extended space, and when the GC is used over that ratio, the space-xx is enlarged: Maxmetaspacefreeratio the minimum ratio of space, when the GC, memory footprint below this ratio, will reduce the space
The default metaspace will only be limited to the local memory size. When the metaspace reaches the current size of the metaspacesize, the GC is triggered. Of course you can set metaspacesize a larger value to delay triggering the GC.
More about Metaspace
Http://www.infoq.com/articles/Java-PERMGEN-Removed
Translation:
http://ifeve.com/java-permgen-removed/