Most of the time, We forget that GC exists because it handles memory on its own. But, unfortunately, it is often involved in production incidents. This is at that moment it reminds you it exists and not everything is magic! Moreover, OpenJDK brings a handful of GCs with different characteristics and the default one (well not always…) is not the easiest to understand.
Though, this choice of GCs allows the JVM to adapt to different workloads and applications in terms of latency or throughput. I will explain how to tame those beasts and how to take advantage of them to improve your applications and resources.