Some other improvements include like increse in size of default younger generation size,Concurrent Mark Sweep Collector’s default Young Generation size
,minimum young generation size ,proportion of the overall heap used for the young generation etc.
Java 1.6 Update 14
Major improvements on parallel compacting Garbage Collector are done to increase the performance of the Garbage Collection Process.
This version includes the initial preliminary version of the new Garbage First (G1) which served as a basis to the later versions of improved Garbage Collectors.
The Garbage-First Garbage Collector
The Garbage-First Garbage Collector (or G1 GC for short) is a new Garbage Collector that is being introduced in JDK 7. An begining version of G1 has also been released in Java SE 6 Update 14. G1 is mainly introduced to replce Concurrent Mark-Sweep GC.
Java 1.7 G1 Garbage Collector
In Java 1.7 might have a new garbage collection strategy by default. It is called G1, which is short for Garbage First. It has been experimentally launched in the Java 1.6 update 14 toreplace the regular Concurrent Mark and Sweep Garbage Collectors with increased performance.
G1 is considered as “server centric” with following attributes.
- G1 uses parallelism which are mostly used in hardware today.The main advantage of G1 is designed in such a way to make use of all available CPU’s and utilize the processing power of all CPU’s and increase the performance and speed in Garbage Collection.
- Concurrency feature of G1 allows to run Java threads to minimize the heap operations at stop pauses.
- Next feature which plays a key role in increasing the Garbage Collection is treating the young objects(newly created) and the old objects(which lived for some time) differently.G1 mainly focuses on young objects as they can be reclaimable when traversing the old objects.
- Heap compaction is done to eliminate fragmentation problems.
- G1 can be more predictable when compared to CMS.
Features of G1 Garbage Collector
- A single contiguous heap which is split into same-sized regions. No separation between younger and older regions.
- G1 uses evacuation pauses.Evacuation pauses are done in parallel by using all the available processors.
- G1 uses a pause prediction model to meet user-defined pause time targets
- Like CMS,G1 also periodically performs a concurrent marking phase.
- Unlike CMS, G1 does not perform a concurrent sweeping phase.
August 28, 2010
Java