1 Matching Annotations
- Aug 2023
-
learning.oreilly.com learning.oreilly.com
-
Most of the time, people are not aware that there isn't only one, but four, garbage collectors. The four garbage collectors are—Serial, Parallel, Concurrent, and Garbage First (G1). We will see them in the following section. There are some third-party garbage collectors, such as Shenandoah. JVM HotSpot's default garbage collector is Parallel up to Java 8, while from Java 9, the default collector is Garbage First Garbage Collector (G1 GC). A Parallel garbage collector isn't best most of the time; however, it depends on our application requirements. For example, the Concurrent Mark Sweep (CMS) and G1 collectors cause less frequent GC pauses. But when they do cause a pause, the pause duration will most likely be longer than a pause caused by the Parallel collector. On the other hand, the Parallel collector usually achieves higher throughput for the same heap size.
garbage collection
-