JEP 248: Make G1 the Default Garbage Collector

OwnerStefan Johansson
TypeFeature
ScopeJDK
StatusClosed / Delivered
Release9
Componenthotspot / gc
Discussionhotspot dash dev at openjdk dot java dot net
EffortM
DurationM
Reviewed byMikael Vidstedt
Endorsed byMikael Vidstedt
Created2015/02/16 19:58
Updated2017/09/12 14:30
Issue8073273

Summary

Make G1 the default garbage collector on 32- and 64-bit server configurations.

Motivation

Limiting GC pause times is, in general, more important than maximizing throughput. Switching to a low-pause collector such as G1 should provide a better overall experience, for most users, than a throughput-oriented collector such as the Parallel GC, which is currently the default.

Many performance improvements were made to G1 in JDK 8 and its update releases, and further improvements are planned for JDK 9. The introduction of concurrent class unloading (JEP 156) in JDK 8u40 made G1 a fully-featured garbage collector, ready to be the default.

Description

Changing the default collector is straightforward.

Risks and Assumptions