G1 garbage collection permanent generation and Metaspace__java

Source: Internet
Author: User

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/

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.