Tagged articles

JVM

1071 articles · Page 5 of 11
Senior Tony
Senior Tony
Jul 23, 2023 · Backend Development

Master JVM Tuning: Balancing Pause Time, Throughput, and Memory Usage

This article explains the core trade‑offs of JVM tuning—short pause times versus high throughput—provides quantitative goals, outlines when tuning is needed, details step‑by‑step optimization procedures, and lists common GC strategies and command‑line parameters for effective Java performance tuning.

Garbage CollectionJVMMemory Management
0 likes · 12 min read
Master JVM Tuning: Balancing Pause Time, Throughput, and Memory Usage
Architect
Architect
Jul 21, 2023 · Fundamentals

JVM Basics, Class Loading, Runtime Data Areas, Garbage Collection and Tuning Guide

This article provides a concise yet comprehensive overview of the Java Virtual Machine, covering its core components, how Java source files are compiled and executed, class‑loader mechanisms, runtime memory areas, garbage‑collection algorithms, and practical JVM tuning parameters for optimal performance.

ClassLoaderGarbage CollectionJVM
0 likes · 31 min read
JVM Basics, Class Loading, Runtime Data Areas, Garbage Collection and Tuning Guide
Top Architect
Top Architect
Jul 18, 2023 · Cloud Native

Java Containerization Guide: Base Image Selection, JDK/JRE Choice, JVM Options, Signal Handling, Memory Limits, DNS Caching, and Native Compilation

This comprehensive guide explains how to containerize Java applications by choosing appropriate base images, deciding between JDK and JRE, selecting a JVM, handling graceful shutdown signals, configuring memory limits, managing DNS caching, and optionally compiling to native binaries with GraalVM.

DockerJVMMemory Management
0 likes · 23 min read
Java Containerization Guide: Base Image Selection, JDK/JRE Choice, JVM Options, Signal Handling, Memory Limits, DNS Caching, and Native Compilation
Programmer DD
Programmer DD
Jul 15, 2023 · Operations

Why Is My Elasticsearch Cluster Using 99% Memory? Sharding, Translog & JVM Insights

This article analyzes a 7‑node Elasticsearch cluster with 500 million documents, revealing excessive shard count, high heap and OS memory usage, large translog, low query‑cache hit rate, and heavy I/O, and offers concrete recommendations on mapping, sharding, JVM tuning, and resource management to restore performance.

Cluster MonitoringElasticsearchJVM
0 likes · 17 min read
Why Is My Elasticsearch Cluster Using 99% Memory? Sharding, Translog & JVM Insights
iQIYI Technical Product Team
iQIYI Technical Product Team
Jul 14, 2023 · Backend Development

Investigation and Optimization of Long GC Pauses Caused by Excessive FinalReference in Spring Cloud Gateway

The team discovered that frequent Logback file rotations created thousands of FileOutputStream objects whose finalize‑based FinalReference instances flooded the G1GC reference‑processing phase, causing 13‑second pauses, and resolved the issue by enabling parallel reference processing, enlarging log rotation size, and adjusting GC initiation thresholds.

FinalReferenceGC pauseJVM
0 likes · 13 min read
Investigation and Optimization of Long GC Pauses Caused by Excessive FinalReference in Spring Cloud Gateway
macrozheng
macrozheng
Jul 3, 2023 · Fundamentals

Why Java Creates Only One String Object: Understanding Constant Folding

This article explains how Java's compiler optimizes string concatenation through constant folding, the rules that define compile‑time constants, and why only a single String object is created in many seemingly multiple‑object scenarios.

Compile-time ConstantJVMconstant folding
0 likes · 11 min read
Why Java Creates Only One String Object: Understanding Constant Folding
Practical DevOps Architecture
Practical DevOps Architecture
Jun 29, 2023 · Backend Development

Comprehensive Course Outline for Backend Development: Databases, Frameworks, Microservices, Messaging, Collections, and JVM

This article presents a detailed curriculum for backend development, covering fundamental concepts and practical topics such as database design and optimization, popular frameworks like Spring and Hibernate, microservice architecture, message middleware (Redis, RabbitMQ, Kafka), common data structures, concurrency, JVM internals, and related interview questions.

DatabasesJVMMicroservices
0 likes · 9 min read
Comprehensive Course Outline for Backend Development: Databases, Frameworks, Microservices, Messaging, Collections, and JVM
JD Retail Technology
JD Retail Technology
Jun 27, 2023 · Backend Development

Analysis and Optimization of G1GC Long Pauses Caused by MySQL Driver Phantom References

The article investigates intermittent long G1GC pauses in a Java 1.8 application caused by mis‑configured G1 parameters and MySQL driver phantom references that retain many idle connections, then presents detailed log analysis and multiple remediation steps including JVM flag tuning, connection‑pool adjustments, and driver upgrades.

G1GCJVMMySQL
0 likes · 30 min read
Analysis and Optimization of G1GC Long Pauses Caused by MySQL Driver Phantom References
Su San Talks Tech
Su San Talks Tech
Jun 19, 2023 · Backend Development

Master JVM Performance: Memory Model, OOM Cases, and Tuning Tools

This article reviews the Java HotSpot memory model, explains when JVM tuning is needed, details common OutOfMemoryError scenarios with reproducible code, introduces built‑in monitoring utilities and third‑party tools, and provides practical tuning parameters and case studies for optimizing Java applications.

Garbage CollectionJVMMonitoring Tools
0 likes · 24 min read
Master JVM Performance: Memory Model, OOM Cases, and Tuning Tools
JD Retail Technology
JD Retail Technology
Jun 7, 2023 · Backend Development

Performance Optimization: Code and Design Techniques for Java Services

This article explains service performance concepts and presents systematic code‑level and architectural optimizations for Java back‑ends, covering class preloading, thread‑pool usage, static variables, cache‑line alignment, false sharing mitigation, branch prediction, copy‑on‑write, method inlining, reflection caching, exception handling, logging practices, lock granularity, and pooling strategies, all illustrated with concrete code examples.

Cache AlignmentJVMbackend development
0 likes · 33 min read
Performance Optimization: Code and Design Techniques for Java Services
JD Cloud Developers
JD Cloud Developers
May 31, 2023 · Fundamentals

How Shenandoah and ZGC Achieve Sub‑10ms Pauses in Modern Java

This article compares the Shenandoah and ZGC garbage collectors introduced in OpenJDK, explaining their design goals, key differences from G1, core mechanisms such as connection matrices and forwarding or colored pointers, and detailing each collector’s concurrent phases to achieve pause times under 10 ms regardless of heap size.

Garbage CollectionJVMLow Pause
0 likes · 16 min read
How Shenandoah and ZGC Achieve Sub‑10ms Pauses in Modern Java
JD Cloud Developers
JD Cloud Developers
May 10, 2023 · Fundamentals

Mastering Java Garbage Collectors: When to Choose Serial, Parallel, CMS, or G1

This article explores the evolution of Java garbage collectors—from the simple Serial and Parallel collectors to the concurrent CMS and region-based G1—detailing their algorithms, tuning parameters, strengths, weaknesses, and best‑practice recommendations for selecting the optimal collector based on workload and memory constraints.

Garbage CollectionJVMMemory Management
0 likes · 14 min read
Mastering Java Garbage Collectors: When to Choose Serial, Parallel, CMS, or G1
DeWu Technology
DeWu Technology
May 5, 2023 · Fundamentals

Understanding JVM Safepoints: Concepts, Examples, and Tuning

JVM safepoints are pause points where the VM can stop all threads for operations like garbage collection; the article shows how counted loops can prevent threads from reaching safepoints, causing unexpected long sleeps, and explains tuning flags, loop‑counter changes, and best practices to avoid STW pauses.

Garbage CollectionJVMSafepoint
0 likes · 18 min read
Understanding JVM Safepoints: Concepts, Examples, and Tuning
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
May 4, 2023 · Fundamentals

Comprehensive Guide to JVM Memory Model, Garbage Collection Algorithms, Collectors, Performance Tuning, and Tools

This article provides a comprehensive overview of the JVM, covering its memory model, heap and stack structures, four garbage‑collection algorithms, seven collectors including G1 and ZGC, performance‑tuning steps, analysis tools, and guidance on obtaining the full series of resources.

Garbage CollectionJVMMemory Model
0 likes · 5 min read
Comprehensive Guide to JVM Memory Model, Garbage Collection Algorithms, Collectors, Performance Tuning, and Tools
JD Cloud Developers
JD Cloud Developers
Apr 27, 2023 · Fundamentals

Understanding JVM Runtime Memory and Garbage Collection: A Complete Guide

This article explains the JVM's runtime memory structure—including the method area, heap, stacks, and program counter—details object memory layout, garbage collection roots, marking algorithms, generational models, and various GC algorithms such as mark‑sweep, mark‑copy, and mark‑compact, providing a comprehensive overview.

GC AlgorithmsGarbage CollectionGenerational GC
0 likes · 16 min read
Understanding JVM Runtime Memory and Garbage Collection: A Complete Guide
System Architect Go
System Architect Go
Apr 23, 2023 · Cloud Native

Combining JVM Heap and Kubernetes Memory Requests/Limits to Avoid Out‑Of‑Memory Issues

This article explains how JVM heap, metaspace, and other non‑heap memory interact with Kubernetes pod memory requests and limits, demonstrates practical experiments with different heap sizes, and provides guidelines for configuring container‑aware JVM flags and pod resources to prevent crashes and evictions.

JVMKubernetesMemory Management
0 likes · 20 min read
Combining JVM Heap and Kubernetes Memory Requests/Limits to Avoid Out‑Of‑Memory Issues
JD Tech
JD Tech
Apr 18, 2023 · Backend Development

Case Study: Long GC Times Caused by Database Connection Pool Issues and Mitigation Strategies

This article analyzes a production incident where excessive Full GC pauses during a high‑traffic promotion were traced to stale database connections in the DBCP pool, explains the investigation steps, root cause, and presents several JVM and connection‑pool configuration solutions to prevent similar performance degradations.

GCJVMdatabase-connection-pool
0 likes · 8 min read
Case Study: Long GC Times Caused by Database Connection Pool Issues and Mitigation Strategies
Architect's Guide
Architect's Guide
Apr 15, 2023 · Backend Development

Understanding Java String Concatenation, StringBuilder, and JVM Object Creation

The article explains why using the '+' operator for string concatenation in Java creates multiple temporary objects, how the StringBuilder class and compiler optimizations like StringConcatFactory reduce memory overhead, and demonstrates object creation counts through interview‑style examples and javap bytecode analysis.

JVMStringBuilderjava
0 likes · 9 min read
Understanding Java String Concatenation, StringBuilder, and JVM Object Creation
Top Architect
Top Architect
Apr 3, 2023 · Backend Development

Lock Optimization and Escape Analysis in the JVM

This article explains how the JVM optimizes locking through spin locks, adaptive spinning, lock elimination, and lock coarsening, and describes escape analysis techniques that enable stack allocation, scalar replacement, and synchronization removal, illustrated with Java code examples and diagrams.

Escape AnalysisJVMconcurrency
0 likes · 8 min read
Lock Optimization and Escape Analysis in the JVM
Selected Java Interview Questions
Selected Java Interview Questions
Mar 29, 2023 · Backend Development

JVM Parameter Tuning for a Platform Handling 1 Million Daily Login Requests on an 8 GB Node

This article presents a comprehensive, step‑by‑step guide on estimating capacity, selecting and configuring garbage collectors, sizing heap, young and survivor spaces, tuning thread stacks, and adding diagnostic options for a Java service that must handle one million login requests per day on a server with 8 GB of memory.

CMSG1Garbage Collection
0 likes · 26 min read
JVM Parameter Tuning for a Platform Handling 1 Million Daily Login Requests on an 8 GB Node
Java Backend Technology
Java Backend Technology
Mar 24, 2023 · Backend Development

Optimizing JVM Settings for 1M Daily Logins on an 8GB Server

This article walks through a step‑by‑step approach to sizing JVM heap, young generation, GC selection, and related parameters for a platform handling one million login requests per day on a node with 8 GB memory, providing practical formulas, example configurations, and tuning tips.

Garbage CollectionJVMMemory Management
0 likes · 24 min read
Optimizing JVM Settings for 1M Daily Logins on an 8GB Server
Top Architect
Top Architect
Mar 20, 2023 · Backend Development

JVM Tuning Guide for Handling 1 Million Daily Login Requests on an 8 GB Server

This article presents a step‑by‑step guide on how to size and configure JVM parameters—including heap, young generation, stack, GC selection, and Metaspace—to reliably support a platform that processes one million login requests per day on a server with 8 GB of memory.

Garbage CollectionJVMMemory Management
0 likes · 25 min read
JVM Tuning Guide for Handling 1 Million Daily Login Requests on an 8 GB Server
Architect
Architect
Mar 18, 2023 · Backend Development

How to Configure JVM Parameters for a Platform Handling 1 Million Daily Login Requests on an 8 GB Server

This article explains a step‑by‑step methodology for estimating capacity, selecting appropriate garbage collectors, sizing JVM memory regions, and tuning advanced parameters such as survivor ratio, tenuring threshold, and Metaspace to reliably support a login service that processes one million requests per day on a machine with 8 GB of RAM.

Garbage CollectionJVMMemory Management
0 likes · 25 min read
How to Configure JVM Parameters for a Platform Handling 1 Million Daily Login Requests on an 8 GB Server
JD Tech
JD Tech
Mar 16, 2023 · Fundamentals

A Comprehensive Overview of Java Garbage Collection Algorithms and ZGC

This article explains the fundamentals of Java garbage collection, detailing classic algorithms such as reference counting, reachability analysis, mark‑sweep, copying, mark‑compact, and generational collectors, then introduces modern collectors like Serial, Parallel, CMS, G1, and the low‑latency ZGC, highlighting their mechanisms, advantages, and drawbacks.

Garbage CollectionJVMMemory Management
0 likes · 27 min read
A Comprehensive Overview of Java Garbage Collection Algorithms and ZGC
IT Services Circle
IT Services Circle
Mar 11, 2023 · Fundamentals

Understanding Java Class Loaders and the Parent Delegation Model

This article explains the Java class‑loading mechanism, reviews the load‑link‑initialize process, describes the built‑in Bootstrap, Extension and Application class loaders, introduces the parent‑delegation model, shows its execution flow with code examples, and discusses how to customize or break the model.

ClassLoaderCustom ClassLoaderJVM
0 likes · 16 min read
Understanding Java Class Loaders and the Parent Delegation Model
Su San Talks Tech
Su San Talks Tech
Mar 10, 2023 · Backend Development

Why Did Our Java Service Crash with OOM? A Deep Dive into Root Causes and Fixes

An online service experienced severe latency due to massive GAP times, leading to repeated OutOfMemoryErrors; by analyzing monitoring data, JVM dumps, and SQL queries, the team uncovered a massive userId array causing a 1 GB count query, then implemented request limits and JVM flags to prevent recurrence.

DatabaseJVMOutOfMemoryError
0 likes · 8 min read
Why Did Our Java Service Crash with OOM? A Deep Dive into Root Causes and Fixes
Ctrip Technology
Ctrip Technology
Mar 9, 2023 · Backend Development

Optimizing Hotel Query Service Memory Usage: GC Tuning, Native Memory Management, and Migration to jemalloc

This article details the systematic reduction of memory consumption for Ctrip's hotel query service by halving container memory, evaluating and tuning modern garbage collectors, diagnosing off‑heap leaks, and ultimately replacing the default ptmalloc allocator with jemalloc to achieve stable performance and lower resource costs.

Backend PerformanceGarbage CollectionJVM
0 likes · 22 min read
Optimizing Hotel Query Service Memory Usage: GC Tuning, Native Memory Management, and Migration to jemalloc
Top Architect
Top Architect
Mar 8, 2023 · Backend Development

JVM Parameter Tuning for a Service Handling 10 Million Daily Login Requests on an 8 GB Node

This article walks through a systematic approach to sizing and configuring JVM parameters—including heap, young generation, GC algorithm, Metaspace, and safety‑point settings—for a high‑traffic login service that receives one million requests per day on a server with 8 GB of memory, providing both practical code examples and interview‑style explanations.

Garbage CollectionJVMMemory Management
0 likes · 25 min read
JVM Parameter Tuning for a Service Handling 10 Million Daily Login Requests on an 8 GB Node
Selected Java Interview Questions
Selected Java Interview Questions
Mar 5, 2023 · Backend Development

JVM Parameter Tuning for a Platform with 1 Million Daily Login Requests on an 8 GB Node

This article walks through a systematic approach to sizing and configuring JVM memory and garbage‑collector parameters for a service handling one million login requests per day on an 8 GB server, covering capacity planning, GC selection, heap region sizing, thread‑stack settings, dynamic age thresholds, large‑object handling, and diagnostic options such as heap dumps and GC logging.

Garbage CollectionJVMMemory Management
0 likes · 23 min read
JVM Parameter Tuning for a Platform with 1 Million Daily Login Requests on an 8 GB Node
Selected Java Interview Questions
Selected Java Interview Questions
Mar 4, 2023 · Backend Development

Analyzing the Performance Impact of try-catch in Java

This article investigates the common belief that using try-catch in Java severely degrades performance by examining JVM exception handling, bytecode generation, compilation optimizations, and extensive benchmark tests, ultimately showing that the overhead is negligible in most scenarios.

Exception HandlingJVMbenchmark
0 likes · 16 min read
Analyzing the Performance Impact of try-catch in Java
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 3, 2023 · Mobile Development

Understanding Java Object Locks and Their Implementation in the Android Runtime (ART)

The article explains how Java’s synchronized keyword works by describing instance, static and block locks, the monitor‑enter/exit bytecodes, the ART object header’s lock word states (thin, fat, hash, forwarding), lock inflation mechanisms, and the internal runtime functions that implement Object.wait(), notify() and related futex handling.

Android RuntimeJVMjava
0 likes · 13 min read
Understanding Java Object Locks and Their Implementation in the Android Runtime (ART)
macrozheng
macrozheng
Mar 2, 2023 · Backend Development

Does a try‑catch Inside a Java Loop Really Slow Down Your Code?

This article investigates whether placing a try‑catch block inside a Java for‑loop impacts performance, presenting JMH benchmarks, bytecode analysis, and insights from Effective Java to clarify common misconceptions and provide practical guidance on exception handling in performance‑critical code.

Effective JavaJVMjava
0 likes · 7 min read
Does a try‑catch Inside a Java Loop Really Slow Down Your Code?
Top Architect
Top Architect
Feb 28, 2023 · Fundamentals

JVM Lock Optimization, Escape Analysis, and Synchronization Elimination

This article explains how the JVM improves concurrency performance through lock optimization techniques such as spin locks, lock elimination, lock coarsening, and escape analysis, illustrating each concept with code examples and discussing related optimizations like stack allocation and scalar replacement.

Escape AnalysisJVMconcurrency
0 likes · 9 min read
JVM Lock Optimization, Escape Analysis, and Synchronization Elimination
JD Retail Technology
JD Retail Technology
Feb 23, 2023 · Operations

Understanding and Tuning JVM ParallelGCThreads and Related Memory Parameters

This article explains the trade‑off between throughput and pause time in JVM garbage collection, details how the ParallelGCThreads, ConcGCThreads, and CICompilerCount parameters are calculated and affect performance, presents experimental results, and provides concrete configuration recommendations for both on‑heap and off‑heap memory in containerized Java applications.

DockerGCJVM
0 likes · 14 min read
Understanding and Tuning JVM ParallelGCThreads and Related Memory Parameters
JD Retail Technology
JD Retail Technology
Feb 21, 2023 · Fundamentals

Understanding Java Object Memory Layout, Monitor, and Synchronization Mechanisms

This article explains the JVM object memory layout—including object header, instance data, and alignment padding—details the structure of the Mark Word and Klass Word, describes how monitors and the synchronized keyword work at the bytecode level, and covers lock states, inflation, bias revocation, and spin optimizations with practical code examples.

JVMLockObject Memory Layout
0 likes · 20 min read
Understanding Java Object Memory Layout, Monitor, and Synchronization Mechanisms
37 Interactive Technology Team
37 Interactive Technology Team
Feb 20, 2023 · Fundamentals

Fundamentals of the JVM: HotSpot, JIT, Memory Areas, Garbage Collection, and Class Loading

The article explains how the HotSpot JVM executes Java by interpreting bytecode, using client or server JIT compilers to translate hot methods into native code, describes the five runtime memory areas, outlines major garbage‑collection algorithms and tuning options, and details the class‑loading process and hierarchical classloader model.

Class LoadingJVMMemory Management
0 likes · 24 min read
Fundamentals of the JVM: HotSpot, JIT, Memory Areas, Garbage Collection, and Class Loading
Open Source Linux
Open Source Linux
Feb 15, 2023 · Backend Development

Choosing Java Docker Base Images & JDKs: Optimize Shutdown, Memory, and DNS

This article explains how to select the proper base image (Alpine or Debian), decide between JDK and JRE, choose Oracle or OpenJDK, handle graceful shutdown signals in Docker, configure memory limits across JDK versions, manage DNS caching, and optionally compile Java applications to native binaries with GraalVM.

DNSDockerGraalVM
0 likes · 25 min read
Choosing Java Docker Base Images & JDKs: Optimize Shutdown, Memory, and DNS
Top Architect
Top Architect
Feb 7, 2023 · Fundamentals

Understanding Java Heavyweight Locks: ObjectMonitor vs AQS

This article explains the differences and similarities between Java's ObjectMonitor and the AbstractQueuedSynchronizer (AQS) implementations of heavyweight locks, covering their internal data structures, waiting queues, lock acquisition order, and how synchronized interacts with wait/notify mechanisms.

AQSJVMObjectMonitor
0 likes · 11 min read
Understanding Java Heavyweight Locks: ObjectMonitor vs AQS
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Feb 1, 2023 · Fundamentals

Understanding ZGC: The Next‑Generation Low‑Latency Java Garbage Collector

ZGC, the Z Garbage Collector introduced in JDK 11, is a low‑latency, region‑based JVM garbage collector that uses colored pointers, load barriers, and multi‑mapping to achieve sub‑10 ms pause times across heap sizes up to several terabytes, with concurrent marking, relocation, and three brief STW phases.

Garbage CollectionJVMMemory Management
0 likes · 8 min read
Understanding ZGC: The Next‑Generation Low‑Latency Java Garbage Collector
Qunar Tech Salon
Qunar Tech Salon
Jan 31, 2023 · Operations

Root Cause Analysis and Mitigation of JVM GC‑Induced OOM and Memory Fragmentation in a Containerized Hotel Pricing Service

This article details how long JVM garbage‑collection pauses and glibc ptmalloc memory‑fragmentation caused container OOM kills in a hotel‑pricing system, and explains the step‑by‑step diagnosis, JVM tuning, Kubernetes health‑check adjustments, and the replacement of ptmalloc with jemalloc to eliminate the issue.

GCJVMKubernetes
0 likes · 9 min read
Root Cause Analysis and Mitigation of JVM GC‑Induced OOM and Memory Fragmentation in a Containerized Hotel Pricing Service
Open Source Linux
Open Source Linux
Jan 17, 2023 · Backend Development

Why Your Java App Gets OOMKilled in Kubernetes and How to Fix It

This article explains why Java applications running in Kubernetes containers are often terminated with OOMKilled (exit code 137), analyzes the underlying JVM memory‑limit mismatches, and provides practical solutions using cgroup‑aware JVM flags and memory‑tuning techniques.

DockerJVMKubernetes
0 likes · 14 min read
Why Your Java App Gets OOMKilled in Kubernetes and How to Fix It
Alibaba Cloud Native
Alibaba Cloud Native
Jan 16, 2023 · Cloud Native

Why Java Attach Fails on PID 1 in Containers and How to Fix It

The article reproduces the AttachNotSupportedException when Java runs as PID 1 in a container, explains the JVM attach workflow and LinuxThread model, and provides practical workarounds such as creating .attach_pid files, enabling StartAttachListener, or using newer JDK images.

ArthasAttachCloud Native
0 likes · 11 min read
Why Java Attach Fails on PID 1 in Containers and How to Fix It
Alibaba Cloud Developer
Alibaba Cloud Developer
Jan 16, 2023 · Backend Development

Unlock Non‑Spring AOP with JVM‑Sandbox: A Practical Guide for Java Backend

JVM‑Sandbox provides a non‑intrusive, runtime AOP solution for Java backend applications, enabling developers to instrument code outside the Spring container, record traffic, hot‑fix vulnerabilities, simulate failures, and monitor Spring bean initialization, all through JVMTI, Instrumentation, and event‑driven modules.

AOPInstrumentationJVM
0 likes · 17 min read
Unlock Non‑Spring AOP with JVM‑Sandbox: A Practical Guide for Java Backend
Alibaba Cloud Native
Alibaba Cloud Native
Jan 14, 2023 · Cloud Native

Why Java Apps OOM in Kubernetes Even Below Xmx and How to Fix It

This article explains why Java applications running in Kubernetes can encounter Out‑Of‑Memory errors despite heap usage staying under the Xmx limit, by examining container resource limits, JVM memory models, cgroup behavior, and provides practical configuration recommendations to prevent OOM.

Cloud NativeJVMKubernetes
0 likes · 16 min read
Why Java Apps OOM in Kubernetes Even Below Xmx and How to Fix It
DeWu Technology
DeWu Technology
Jan 9, 2023 · Fundamentals

Understanding JVM Bytecode, JIT Compilation, and Garbage Collection

The article explains how the JVM executes Java bytecode, detailing bytecode structure, lambda compilation, JIT tiers and optimizations such as inlining and escape analysis, describes runtime memory areas and generational garbage collectors—including G1, ZGC, and Shenandoah—and offers key tuning flags for balancing throughput, latency, and heap size.

BytecodeGarbage CollectionJVM
0 likes · 52 min read
Understanding JVM Bytecode, JIT Compilation, and Garbage Collection
Architect's Guide
Architect's Guide
Dec 29, 2022 · Fundamentals

Understanding Java Garbage Collection Algorithms and JVM GC Strategies

This article explains what constitutes garbage in the Java heap, compares reference‑counting and root‑reachability approaches, demonstrates a reference‑counting example, and reviews the main garbage‑collection algorithms and collectors (Serial, ParNew, Parallel Scavenge, Serial Old, Parallel Old, CMS, G1) used by modern JVMs.

G1GC AlgorithmsGarbage Collection
0 likes · 19 min read
Understanding Java Garbage Collection Algorithms and JVM GC Strategies
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Dec 23, 2022 · Fundamentals

Four JVM Garbage Collection Algorithms Explained

This article introduces the four main JVM garbage collection algorithms—Mark‑Sweep, Copying, Mark‑Compact, and Generational collection—explaining their mechanisms, suitable scenarios, advantages, and drawbacks, and summarizing how they are applied to young and old generations in modern Java virtual machines.

CopyingGarbage CollectionGenerational GC
0 likes · 7 min read
Four JVM Garbage Collection Algorithms Explained
Code Ape Tech Column
Code Ape Tech Column
Dec 12, 2022 · Fundamentals

JVM GC Log Analysis and Tuning Practice

This article explains how to enable detailed GC logging in the JVM, interpret both Young and Full GC log entries, configure heap parameters, and use the online visualizer gceasy.io to analyze performance metrics such as throughput, pause latency, and memory usage for effective JVM tuning.

GCJVMjava
0 likes · 9 min read
JVM GC Log Analysis and Tuning Practice
Sanyou's Java Diary
Sanyou's Java Diary
Dec 1, 2022 · Fundamentals

Mastering JVM Memory: From Heap to Metaspace and Beyond

This article provides a comprehensive overview of the Java Virtual Machine memory architecture, covering heap layout, object allocation, Metaspace, stack frames, native method stacks, program counters, direct memory, and code cache, complete with configuration tips and practical code examples.

Garbage CollectionJVMMetaspace
0 likes · 18 min read
Mastering JVM Memory: From Heap to Metaspace and Beyond
Youzan Coder
Youzan Coder
Nov 28, 2022 · Backend Development

How Switching from CMS to G1 Boosted Java Service Stability and Cut Costs

The article details how a Java team diagnosed frequent Full GC pauses caused by CMS, migrated to G1GC, adjusted JVM flags, scaled container specs, and achieved dramatically lower pause times, reduced instance counts, and significant cost savings while improving overall service stability.

CMSG1GCJVM
0 likes · 13 min read
How Switching from CMS to G1 Boosted Java Service Stability and Cut Costs
Programmer DD
Programmer DD
Nov 10, 2022 · Backend Development

How to Choose the Right Java Base Image, JDK/JRE, and Optimize Container Settings

This guide walks through selecting Alpine or Debian base images, deciding between JDK and JRE, picking Oracle or OpenJDK, choosing the appropriate JVM, handling graceful shutdown signals, configuring memory limits across JDK versions, managing DNS cache, and leveraging GraalVM native compilation for Java containers.

DNSDockerJVM
0 likes · 22 min read
How to Choose the Right Java Base Image, JDK/JRE, and Optimize Container Settings
转转QA
转转QA
Nov 9, 2022 · Backend Development

Using JVM‑Sandbox for Exception Injection and Code Enhancement in Java Services

This article introduces JVM‑Sandbox, explains its non‑intrusive AOP capabilities, and provides a step‑by‑step tutorial on installing the sandbox, loading custom modules, performing code enhancement via instrumentation, and testing exception injection in a Java service.

Code EnhancementException InjectionInstrumentation
0 likes · 9 min read
Using JVM‑Sandbox for Exception Injection and Code Enhancement in Java Services
Tuanzi Tech Team
Tuanzi Tech Team
Oct 26, 2022 · Backend Development

Master JVM Performance: Memory Structures, Tuning Parameters, and Monitoring Tips

Explore comprehensive JVM performance optimization, covering memory architecture, key tuning flags, garbage collector selection, common OOM scenarios, and essential monitoring tools such as jstack, jstat, JConsole, and VisualVM, with practical examples and code snippets to help you diagnose and resolve memory issues.

Garbage CollectionJVMMemory Management
0 likes · 20 min read
Master JVM Performance: Memory Structures, Tuning Parameters, and Monitoring Tips
IT Architects Alliance
IT Architects Alliance
Sep 29, 2022 · Backend Development

Does Using try-catch in Java Significantly Impact Performance? An In-depth JVM Bytecode and JIT Analysis

Although a common belief claims that Java's try‑catch blocks severely degrade performance, this article dissects JVM exception handling, bytecode generation, and JIT/AOT optimizations, presents detailed test code and benchmarks, and demonstrates that when no exception occurs, the overhead is negligible.

BytecodeJVMjava
0 likes · 17 min read
Does Using try-catch in Java Significantly Impact Performance? An In-depth JVM Bytecode and JIT Analysis
Architect
Architect
Sep 26, 2022 · Backend Development

Does Using try‑catch in Java Significantly Impact Performance? An In‑Depth JVM Analysis

This article investigates the common belief that Java's try‑catch blocks severely degrade performance by examining JVM exception handling mechanisms, analyzing compiled bytecode, and presenting extensive benchmark tests under various JVM compilation modes to determine the real impact of exception handling on execution speed.

Exception HandlingJVMbenchmark
0 likes · 16 min read
Does Using try‑catch in Java Significantly Impact Performance? An In‑Depth JVM Analysis
Selected Java Interview Questions
Selected Java Interview Questions
Sep 23, 2022 · Backend Development

Diagnosing and Resolving a Native Memory Leak in Spring Boot Applications

This article details the investigation of an unexpected native memory consumption issue in a Spring Boot service, describing how JVM and system‑level tools were used to pinpoint the leak caused by the Spring Boot loader's Inflater usage and how configuring MCC scan paths or upgrading Spring Boot eliminated the problem.

JVMLinuxMemory Management
0 likes · 12 min read
Diagnosing and Resolving a Native Memory Leak in Spring Boot Applications
Alibaba Cloud Native
Alibaba Cloud Native
Sep 21, 2022 · Cloud Native

Why Continuous Profiling Is Essential for Cloud‑Native Java Applications

Continuous profiling (CP) bridges production and development by constantly feeding performance data back to developers, enabling on‑CPU and off‑CPU analysis, reducing overhead, and supporting tools like JFR and async‑profiler to diagnose CPU, memory, lock, and I/O bottlenecks in cloud‑native Java services.

JVMProfiling Toolsjava
0 likes · 20 min read
Why Continuous Profiling Is Essential for Cloud‑Native Java Applications
Code Ape Tech Column
Code Ape Tech Column
Sep 21, 2022 · Backend Development

Investigating Excessive Native Memory Usage in a Spring Boot Application Migrated to MDP Framework

After migrating a project to the MDP framework based on Spring Boot, the system repeatedly reported high swap usage despite a 4 GB heap configuration, leading to an investigation that uncovered native memory consumption caused by unchecked JAR scanning and allocator behavior, which was resolved by limiting scan paths and updating Spring Boot's inflater implementation.

JVMNative MemorySpring Boot
0 likes · 12 min read
Investigating Excessive Native Memory Usage in a Spring Boot Application Migrated to MDP Framework
Su San Talks Tech
Su San Talks Tech
Sep 17, 2022 · Fundamentals

Why Does Thread.sleep(0) Prevent GC? Uncovering JVM Safepoint Tricks

This article examines a puzzling 'prevent gc' comment in RocketMQ source, explains how inserting Thread.sleep(0) creates a JVM safepoint to avoid long GC pauses, explores counted vs uncounted loops, and demonstrates practical code modifications to improve performance.

Garbage CollectionJVMJava performance
0 likes · 13 min read
Why Does Thread.sleep(0) Prevent GC? Uncovering JVM Safepoint Tricks
vivo Internet Technology
vivo Internet Technology
Sep 14, 2022 · Backend Development

Performance Optimization Practices in Vivo Push Recommendation Service

The Vivo Push recommendation service was dramatically accelerated by replacing regex‑based String.split with a custom utility, converting massive String‑key maps to long keys, and moving large caches off‑heap, which together cut latency by about 32%, boosted throughput roughly 45% and nearly doubled overall performance.

GCHotspot CodeJVM
0 likes · 15 min read
Performance Optimization Practices in Vivo Push Recommendation Service
Programmer DD
Programmer DD
Aug 29, 2022 · Backend Development

Does Java’s try‑catch Really Slow Down Your Code? A Deep Dive into JVM Performance

This article investigates the common belief that Java try‑catch blocks severely degrade performance by examining JVM exception handling mechanics, compiled bytecode, tiered and JIT compilation, and extensive benchmark tests, ultimately showing that try‑catch has negligible impact when no exception occurs.

Exception HandlingJVMbenchmark
0 likes · 18 min read
Does Java’s try‑catch Really Slow Down Your Code? A Deep Dive into JVM Performance
Top Architect
Top Architect
Aug 26, 2022 · Backend Development

Deep Dive into Java synchronized and Lock Mechanisms: Principles, JVM Internals, and Optimizations

This article explains thread safety in Java by detailing how the synchronized keyword and various Lock implementations work, covering their underlying JVM mechanisms, lock upgrade paths, optimizations like biased and lightweight locks, and practical differences between synchronized, ReentrantLock, and ReadWriteLock.

JVMLockReadWriteLock
0 likes · 19 min read
Deep Dive into Java synchronized and Lock Mechanisms: Principles, JVM Internals, and Optimizations
Sohu Tech Products
Sohu Tech Products
Aug 24, 2022 · Fundamentals

JVM JIT and CodeCache Parameter Configuration Guide

This article explains the JVM's Just‑In‑Time compilation mechanism and CodeCache memory area, detailing the purpose and default values of key JIT parameters such as TieredCompilation, CompileThreshold, OnStackReplacePercentage, CICompilerCount, as well as CodeCache settings like InitialCodeCacheSize, ReservedCodeCacheSize, Xmaxjitcodesize, CodeCacheMinimumFreeSpace and UseCodeCacheFlushing, and provides practical tuning advice for high‑traffic Java services.

HotSpotJVMcodecache
0 likes · 15 min read
JVM JIT and CodeCache Parameter Configuration Guide
Top Architect
Top Architect
Aug 23, 2022 · Backend Development

Understanding the Implementation of synchronized in Java and Its Differences with Lock

This article explains how Java's synchronized keyword works at the JVM level, detailing monitorenter/monitorexit bytecode, the role of object monitors, differences between synchronized methods and blocks, and compares its behavior and performance with explicit Lock implementations such as ReentrantLock, including code examples and practical considerations.

JVMLockReentrantLock
0 likes · 8 min read
Understanding the Implementation of synchronized in Java and Its Differences with Lock
Selected Java Interview Questions
Selected Java Interview Questions
Aug 22, 2022 · Backend Development

Understanding Java synchronized and Lock Mechanisms: From Basic Locks to Advanced Optimizations

This article explains Java thread‑safety concepts, the synchronized keyword, its underlying monitor implementation, lock‑upgrade stages, JVM optimizations such as lock elimination and coarsening, and compares explicit Lock interfaces like ReentrantLock and ReadWriteLock, helping developers choose the appropriate synchronization tool.

JVMLockReadWriteLock
0 likes · 16 min read
Understanding Java synchronized and Lock Mechanisms: From Basic Locks to Advanced Optimizations
IT Architects Alliance
IT Architects Alliance
Aug 16, 2022 · Backend Development

Seven Key Directions for Java Code Performance Optimization

This article theoretically outlines seven major Java performance optimization strategies—including reuse, computation, result set, resource conflict, algorithm, high‑efficiency implementation, and JVM tuning—explaining their principles, typical techniques, and how they collectively improve resource utilization and application speed.

JVMbackend developmentjava
0 likes · 11 min read
Seven Key Directions for Java Code Performance Optimization
政采云技术
政采云技术
Aug 9, 2022 · Backend Development

Handling Data Surge in a Data Push Platform: JVM Tuning, Flow Control, and Performance Optimization

This article analyzes the challenges of data‑burst scenarios in a data‑push platform, evaluates traditional throttling methods, presents JVM‑level tuning and a custom heap‑usage based flow‑control mechanism, and validates the solution through extensive pressure testing, demonstrating significant reductions in full GC frequency and overall push latency.

Flow ControlGCJVM
0 likes · 22 min read
Handling Data Surge in a Data Push Platform: JVM Tuning, Flow Control, and Performance Optimization
Sohu Tech Products
Sohu Tech Products
Aug 3, 2022 · Backend Development

Understanding Java try‑catch‑finally Execution, Return Values, and Bytecode Mechanics

This article explains why static code analysis flags certain try‑catch‑finally patterns in Java, details the JVM's handling of exceptions and finally blocks, demonstrates how return values are determined at the bytecode level, and provides practical guidelines and a comprehensive reference of relevant bytecode instructions.

BytecodeJVMtry-catch-finally
0 likes · 21 min read
Understanding Java try‑catch‑finally Execution, Return Values, and Bytecode Mechanics