Two goals. High performance and low pause time.

  1. Serial GCmark-sweep-compact approach for young (Minor GC) as well as old (Major GC) generations garbage collection.Good for small applications with low memory usage.
  2. Parallel GC: Same as Serial GC but uses multiple threads for young generation garbage collection and uses single thread for Old Generation garbage collection.
  3. Parallel Old GC: Same as Parallel GC but uses multiple threads for both Young Generation and Old Generation garbage collection.
  4. Concurrent Mark Sweep (CMS) Collector (aka Concurrent Low Pause Collector)
    Uses parallel GC for young generation and uses CMS for old generation. Tries to minimize the pauses by doing most of the garbage collection work concurrently with the application threads. CMS does not do compaction.Suitable for responsive applications where we can’t afford longer pause times.
  5. G1 Garbage Collector (aka The Garbage First Collector)a. The heap is partitioned into equal-sized chunks.
    b. Concurrent global marking phase to determine the liveness of objects
    c. Collect in regions with least live objects i.e. most garbabe. Uses a technique called evacuation. Copies objects from one or more regions of the heap to a single region on the heap, and in the process both compacts and frees up memory.
    Not a real-time collector.