There are some cases where Java falls back to using the Serial GC instead of G1GC: Less then 2GB of RAM or only one CPU.
This can be the case in some docker environments.
We always want to use G1GC, because it ensures that GC pauses are always short.
There are some cases where Java falls back to using the Serial GC instead of G1GC: Less then 2GB of RAM or only one CPU. This can be the case in some docker environments. We always want to use G1GC, because it ensures that GC pauses are always short.
https://github.com/openjdk/jdk/blob/3121898c33fa3cc5a049977f8677105a84c3e50c/src/hotspot/share/runtime/os.cpp#L1673
Notes for Reviewers