This talk will lay out the basics of Garbage Collection (GC) and dive into internals of allocation, collection and heap management by discussing implementation details, such as algorithms and data structures. Furthermore, the talk will explore specific topics/challenges such as performance (footprint, throughput and pause time), concurrency, parallelization (work-sharing, contention, and synchronization) and heuristics (e.g. optimal heap resizing). Development of OpenJ9’s (Open source JVM implementation) GC will be featured to explore these topics which will reveal how GC’s job of "reclaiming memory" can be implemented in various ways, ranging in complexity, from a single, simple, Stop-The-World collector to multiple collectors working together to form a complex pause-less generational policy. The use cases resulting in such complexity and the challenges associated with it will also be presented. That is, various GC policies will be examined under the hood whereby the audience will gain an understanding of the implications of GC on their applications and how to best take advantage of GC.
The talk will also cover advance features and performance optimizations in OpenJ9. For example, a newly implemented deep-scan optimization will be presented to show how a new optimization was developed to solve performance issues related to deep structures.