What Is Garbage Collection In Java

A Review of Java Garbage Collection Modes and Strategies

As a rule, performance tuning of a JVM involves efforts to delay compaction. Since the majority of objects have a relatively brief time span, garbage collection can be performed on younger objects for a while, but at some point dead, old objects will need to be reclaimed.

Extensive garbage collection can be put on hold as well by old object removal tracking and making use of the memory that is freed that way. But at some point this space will become fragmented as well, and will need to be reclaimed. Tuning can avoid GC for a while, but it cannot be delayed forever.

Virtually all garbage collection modes in Java have to stop application processing at some point to identify which objects are still being used. These can then be collected, and the heap can be de-fragmented and compacted. Bigger heaps lead to longer pause times, resulting in noticeable delays for users and poor application performance.

Garbage collection and the requirement for GC tuning can actually be fully eliminated however - download this white paper to learn how.

© Azul Systems, Inc. 2017 All rights reserved.