Skip to main content

JVM

JDK Tough Way - 6. Practical Guide and Underlying Principles of Tracking Java Heap OOM with JFR

JDK Tough Way - 6. Practical Guide and Underlying Principles of Tracking Java Heap OOM with JFR

·4214 words·20 mins
In-depth guide on how to quickly locate Java heap OOM using JFR (JDK Flight Recorder) with practical methods and underlying principles, covering JFR event analysis for three typical OOM scenarios, including key events such as Allocation Requiring GC, ZAllocationStall, ObjectAllocationOutsideTLAB, and techniques for collecting and analyzing them.
A Brief Look at JEP - JEP-502: Stable Value (Preview)

A Brief Look at JEP - JEP-502: Stable Value (Preview)

·2181 words·5 mins
An exploration of JEP 502’s StableValue API, which addresses the fundamental trade-off between immutability and initialization flexibility in Java. This article covers the API design, core implementation details including double-checked locking patterns, memory semantics, and JIT optimization strategies using the @Stable annotation.
Why HeapDumpOnOutOfMemoryError Should Be Avoided in Production

Why HeapDumpOnOutOfMemoryError Should Be Avoided in Production

·702 words·4 mins
A comprehensive guide exploring why enabling HeapDumpOnOutOfMemoryError can cause significant performance issues in production environments, which OutOfMemoryError types actually trigger heap dumps, and better alternatives like JFR for memory leak detection and automatic service restart strategies.
JDK Tough Way - 4. The Most Detailed JVM Memory Structure Analysis

JDK Tough Way - 4. The Most Detailed JVM Memory Structure Analysis

·23344 words·110 mins
A comprehensive deep-dive into JVM memory architecture covering heap memory, metaspace, thread stacks, and compressed object pointers. This technical analysis examines memory allocation processes, Native Memory Tracking, and provides practical examples using tools like jol, jhsdb, and JFR for understanding JVM memory management internals.
Tackling a Mysterious JVM Safepoint Issue: A Journey from Problem to Solution

Tackling a Mysterious JVM Safepoint Issue: A Journey from Problem to Solution

·1004 words·5 mins
A deep dive into diagnosing and resolving a production JVM issue where applications would freeze during hourly log synchronization tasks. We explore safepoint analysis, JVM log output blocking, asynchronous logging implementation, and WebFlux optimization to achieve a complete solution.
Solving JVM Safepoint Delays: A Journey from EFS Integration to Async Logging

Solving JVM Safepoint Delays: A Journey from EFS Integration to Async Logging

·970 words·5 mins
An in-depth investigation into mysterious JVM safepoint delays after upgrading to Java 17 and implementing centralized log collection with AWS EFS. We discovered how file I/O blocking during log output can freeze entire JVM processes and solved it using async logging and proper WebFlux implementation.
JDK Tough Way - 1. A Comprehensive Guide to Thread Local Allocation Buffers

JDK Tough Way - 1. A Comprehensive Guide to Thread Local Allocation Buffers

·9380 words·45 mins
A deep dive into JVM’s Thread Local Allocation Buffer (TLAB) mechanism, covering design principles, implementation details, performance optimization, and source code analysis. Learn how TLAB improves memory allocation efficiency in multi-threaded environments and master TLAB tuning techniques.