Tuning Garbage-First (G1)

The G1 collector is an incremental, low-pause collector and is the HotSpot VM’s default collector for JDK 11 and onward in server class systems or containers. It provides a balance of low application pause times and high throughput. By dividing the heap into regions that are logically generational, it can collect the heap in regional increments when workloads are high so as not to exceed your pause time goals. Out of the box, it is designed to prioritize low pause times of 200ms or less, but it can also be tuned for higher application throughput, while maintaining reasonably low pause times. This allows you to find a balance that fits your application’s performance goals.

See Garbage-First (G1) Garbage Collector in the HotSpot Virtual Machine Garbage Collection Tuning Guide for more information on tuning G1.


Further Reading

See “Garbage-First Collector Tuning” in the HotSpot Virtual Machine Garbage Collection Tuning Guide for your version of the JDK:

Other Resources:


Last reviewed on Sat Feb 01 2025 00:00:00 GMT+0000 (Coordinated Universal Time)