JVM learning Summary 3-Garbage Collector

Source: Internet
Author: User

Black LineLine indicates that two recyclers can be used together,The two can be used in the same region. G1 is commercially available in JDK and is rarely used in online environments. The following describes the other six types:
It can be seen from the name that it means serial. This recycler was first implemented. It is simple and efficient based on a single thread, however, garbage collection results in "Stop-the-World" (STW). When the memory to be recycled is large, the response time of the program becomes longer.
The full name is Parallel New Generation, that is, the garbage collection period of the New Generation in Parallel. This recycler is basically the same as Serial, but it only uses multiple threads for garbage collection.
Parallel cleanup, that is, the parallel garbage collector. The biggest difference between the recycler and ParNew is that ParNew is usually used with CMS, which generally focuses on reducing the pause time of garbage collection and improving the response speed.
CMS:Concurrent Mark Sweep is a Concurrent recycler designed to reduce the pause time for garbage collection. We can analyze the processing process:

 


There is nothing to say about Serial's old version.

Parallel Old:Parallel Scavenge's older version.





















For applications running on the machine, Serial + Serial Old can be used; for applications with priority in response to web servers, such as Serial) + CMS; For background processing and scientific operations, it can be used to end now, sleep!


Related Article

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.