What is Java’s default GC algorithm?

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…


This content originally appeared on DEV Community and was authored by Ram

Image description

Are you wondering what the default Java Garbage Collection algorithm is? It depends on 3 factors:

  1. Who is your JVM Vendor (i.e., OpenJDK, OpenJ9, Azul …)?
  2. What version of Java are you running (i.e. Java 8, 11, 17…)?
  3. What class of JVM you are running (i.e. client or Server)?

Below table summarizes the default garbage collection algorithms for OpenJDK:

Image description

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


This content originally appeared on DEV Community and was authored by Ram


Print Share Comment Cite Upload Translate Updates
APA

Ram | Sciencx (2024-06-21T06:32:49+00:00) What is Java’s default GC algorithm?. Retrieved from https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/

MLA
" » What is Java’s default GC algorithm?." Ram | Sciencx - Friday June 21, 2024, https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/
HARVARD
Ram | Sciencx Friday June 21, 2024 » What is Java’s default GC algorithm?., viewed ,<https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/>
VANCOUVER
Ram | Sciencx - » What is Java’s default GC algorithm?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/
CHICAGO
" » What is Java’s default GC algorithm?." Ram | Sciencx - Accessed . https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/
IEEE
" » What is Java’s default GC algorithm?." Ram | Sciencx [Online]. Available: https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/. [Accessed: ]
rf:citation
» What is Java’s default GC algorithm? | Ram | Sciencx | https://www.scien.cx/2024/06/21/what-is-javas-default-gc-algorithm/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.