Java Virtual Machine garbage collector

Source: Internet
Author: User

Young generation Collector

Serial collector

The serial collector uses the tag-copy garbage collection algorithm. The serial collector can only use one thread for garbage collection, and when garbage collection is done, all worker threads need to stop working, waiting for the garbage collection thread to finish before other threads can continue to work. In a single-core scenario, this collector is very simple and efficient because it reduces the cost of context switching for many threads.

Parnew Collector

The Parnew garbage collector is a multithreaded version of the serial collector, using the tag-copy garbage collection algorithm. Run multiple collection threads for garbage collection work. This can improve the efficiency of the garbage collection process. The Parnew collector has the same number of garbage collection threads open by default as the current machine, and in order to control the number of GC collection threads, the number of garbage collection threads can be controlled by parameter -xx:parallelgcthreads .

Parallel Scavenge Collector

Parallel Scavenge collector It uses the tag-copy garbage collection algorithm. Like Parnew, it also has a multi-threaded garbage collector.

Old age Collector

Serial Old Collector

The Serial old collector is a single-threaded garbage collector that uses the mark-and-organize algorithm.

Parallel Old Collector

Use the "mark-and-organize" algorithm. is the old version of the parallel scavenge collector.

CMS collector

 

Java Virtual Machine garbage collector

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.