Which Garbage Collectors are available in a particular Zulu version?


Which Garbage Collectors (GC) are available in a specific Zulu release?



You can see which GC are available (and the default GC) in a version of Zulu by running the following command:
$ java -XX:+PrintFlagsFinal -version | grep "Use.*GC "

You will see output similar to:

$ java -XX:+PrintFlagsFinal -version | grep "Use.*GC "
     bool UseAdaptiveSizePolicyWithSystemGC       = false                 {product}
     bool UseConcMarkSweepGC                      = false                 {product}
     bool UseG1GC                                 = false                 {product}
     bool UseMaximumCompactionOnSystemGC          = true                  {product}
     bool UseParNewGC                             = false                 {product}
     bool UseParallelGC                           := true                  {product}
     bool UseParallelOldGC                        = true                  {product}
     bool UseSerialGC                             = false                 {product}
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (Zulu (build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM (Zulu (build 25.275-b01, mixed mode)
Please note: You will need to parse the above output to separate out the GC algorithms from GC parameters.  The algorithms are in Bold. The default (UseParallelGC in this case) has ":= true" value.
As with most OpenJDK vendors, Zulu 8 has the following four GC options:
  1. G1
  2. Parallel*
  3. ConcMarkSweep (CMS)
  4. Serial

* In order to keep compatibility with OpenJDK, the default garbage collector for Zulu 8 is Parallel GC.

Add Comment



Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful