Are you wondering what the default Java Garbage Collection algorithm is? It depends on 3 factors:
- Who is your JVM Vendor (i.e., OpenJDK, OpenJ9, Azul …)?
- What version of Java are you running (i.e. Java 8, 11, 17…)?
- What class of JVM you are running (i.e. client or Server)?
Below table summarizes the default garbage collection algorithms for OpenJDK:
Besides the above-mentioned Serial GC, Parallel GC and G1 GC default algorithms, following algorithms are also available in OpenJDK: CMS GC, Shenandoah GC, ZGC, Epsilon GC. By following the tips given in this post, you can choose the right GC algorithm for your application
Top comments (0)