Java Garbage Collection Basics

Understanding Java Garbage Collection - and what you can do about it

Garbage collection in Java almost always involves finding ways to delay compaction. This can be deployed for a while on younger objects, as they have a relatively brief time span, but at some point old dead objects will need to be reclaimed.

One can hold off on garbage collection for a while longer by using the memory freed through old object removal tracking, but eventually even this space will fragment and will be in need of reclaiming. As a result one can conclude that garbage collection can be put on hold for some time, but not forever.

Therefore almost all GC strategies involve the stopping of application processing at a certain point in time to figure out which objects are still being used. These are then collected, with the heap being de-fragmented and compacted. Larger heaps lead to longer pause times, resulting in noticeable delays for users and poor application performance.

Garbage collection as well as the need for tuning and monitoring can be eliminated however - download this white paper to find out how.

© Azul Systems, Inc. 2017 All rights reserved.