Gerrit Grunwald

Trash Talk - Exploring the memory management in the JVM

Are "stop-the-world" pauses killing your application's performance? Learn how modern JVM garbage collectors balance throughput, latency, and resource usage to keep your services responsive.

Trash Talk - Exploring the memory management in the JVM
#1about 2 minutes

Why JVM memory management and structure matter

Understanding the JVM's automatic memory management and its structure, including the stack and heap, is crucial for application performance and responsiveness.

#2about 1 minute

How objects become garbage through reachability

An object becomes garbage and eligible for collection only when it is no longer reachable from any stack frame, including references held within other collections.

#3about 5 minutes

Understanding stop-the-world pauses and non-moving collectors

Garbage collection often requires stop-the-world pauses, and basic non-moving collectors like Mark and Sweep can lead to heap fragmentation over time.

#4about 7 minutes

Solving fragmentation with moving and generational collectors

Moving collectors like Mark-Compact and Copy, along with generational collection strategies, combat heap fragmentation and optimize for short-lived objects.

#5about 5 minutes

A tour of classic JVM garbage collectors

An overview of classic collectors including the single-threaded Serial, multi-threaded Parallel (throughput), and the now-deprecated Concurrent Mark Sweep (CMS).

#6about 3 minutes

Understanding the modern G1 garbage-first collector

The G1 collector is the default in modern JVMs, using a region-based approach to provide predictable pause times by focusing on areas with the most garbage.

#7about 3 minutes

Exploring low-latency and specialized collectors

Specialized collectors like Epsilon (no-op), Shenandoah, and ZGC are designed for specific use cases like ultra-low latency or massive heaps, often at the cost of throughput.

#8about 2 minutes

How ZGC achieves concurrency with colored pointers

Fully concurrent collectors like ZGC use techniques such as colored pointers and loaded value barriers to move objects and update references without long stop-the-world pauses.

#9about 1 minute

How to choose the right garbage collector

Selecting a garbage collector involves balancing the trade-offs between application throughput, latency from pause times, and overall resource consumption.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
All the videos of Halfstack London 2024!
Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
All the videos of Halfstack London 2024!
BB
Benedikt Bischof
Using Java 17 latest features in real world projects
Welcome to this issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Ron Veen who introduced the audience to some of the most interesting features that got added to the Java language.About the speaker:Ron is a hig...
Using Java 17 latest features in real world projects
BR
Benjamin Ruschin
What Developers Really Need to Create Great Code Demos
Every developer on earth has, at some point, had another developer to thank for a breakthrough, a success, an aha moment they wouldn’t have had without coming across that blog post, that open-source contribution, that reply on socials or that humble ...
What Developers Really Need to Create Great Code Demos

From learning to earning

Jobs that call for the skills explored in this talk.

Rust and GoLang

Rust and GoLang

NHe4a GmbH
Karlsruhe, Germany

Remote
55-65K
Intermediate
Senior
Go
Rust