Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - available garbage collection algorithms [closed]

Does anyone know a proper resource to read on the available garbage collection mechanisms in java? So far I found a couple of websites but they did not contain a comprehensive description with respect to when to use which and what the implementation was. (I am referring to Oracle's jdk)

like image 875
Bober02 Avatar asked Mar 25 '13 14:03

Bober02


1 Answers

As of today, there are 4 GC algorithms available in the Java Hotspot VM:

  • The Serial GC - recommended for client-style applications that do not have low pause time requirements.
  • The Parallel GC - use when the throughput matters.
  • The Mostly-Concurrent GC (also known as Concurrent Mark-Sweep GC(CMS)) - use when the latency matters.
  • The Garbage First GC (G1) - new GC algorithm, for CMS replacement.

You can find more information about these GC algorithms in the references below.

Books:

  • Java Performance - practical guide, contains chapters on GC, explains comprehensively when and how to use various Hotspot GC algorithms,
  • The Garbage Collection Handbook - Garbage-Collection theory explained, mentions all available GC techniques.

Talks/Articles:

  • Java One 2012 Advanced JVM Tuning
  • Java One 2012 G1 Garbage Collector Performance Tuning
  • Garbage Collection Tuning Guide
  • Java HotSpot Garbage Collection

Mailing List:

  • OpenJDK Hotspot GC Use
like image 171
Aleš Avatar answered Sep 21 '22 05:09

Aleš