1. The serial collector was once the only option for the new generation of virtual machines, a single-threaded collector that must stop the world when collecting garbage, which is the default Cenozoic collector that the virtual machine runs in client mode.
2, Serial old is the older version of the Serial collector, is also a single-threaded collector, using the tag collation algorithm.
3. The Parnew Collector is a multithreaded version of the serial collector, and many of the new generation collectors that run in virtual machines in server mode, except serial, can work with the CMS collector only.
4, Parallel scavenge collector is also a new generation of collectors, using the replication algorithm is a parallel multi-threaded collector, its goal is to achieve a controllable running user code with (running user code + garbage collection Time) percent value.
5. The Parallel old collector is an older version of the Parallel scavenge collector, using multi-threaded and tag grooming algorithms.
6. The Concurrent Mark Sweep Collector is a collector that targets the shortest recovery pause time, based on the tag-clearing algorithm.
The process is as follows: initial tag, concurrent tagging, re-tagging, concurrent purging, the advantage is concurrent collection, low pauses, the disadvantage is very sensitive to CPU resources, unable to handle floating garbage, the end of the collection will produce a lot of space debris.
7, G1 Collector is based on the implementation of the labeling algorithm, will not produce space debris, can precisely control the pause, the heap is divided into a number of fixed-size independent areas, and track the extent of these areas of garbage accumulation, in the background to maintain a priority list, each time according to the allowable collection times, Priority to reclaim the most rubbish area (garbage first).
original link: http://blog.csdn.net/lingzhm/article/details/47174391
Simple comparison of seven garbage collectors common to the JVM