Production Troubleshooting
What to do when a live JVM misbehaves: split a slowdown into GC, safepoint, CPU, lock and native-memory causes, each with its own evidence. Senior rounds open with 'the p99 doubled'.
part ofJVM internalsread it →on this pageshowhide
explore
- Latency Regression Triage5 questions
- Flame Graph Profiling5 questions
- Thread-Dump Patterns4 questions
- Safepoint Stall Diagnosis5 questions
- Native Memory Diagnosis5 questions
- Crash Logs & Core Dumps5 questions
- Diagnosing JVMs in Containers5 questions
questions
page 2 of 2What diagnostic evidence should every production JVM in your fleet record continuously, and what overhead budget would you accept for it?
basics
~20 sKeep rotated GC and safepoint logs, a continuous JFR recording on its default settings bounded on disk, and latency histograms per route and dependency: about one to two percent of CPU and a fixed disk slice, with heavier tools only during incidents.
Since Native Memory Tracking can only be enabled when a HotSpot JVM starts, would you turn on its summary mode by default across a fleet of containerised JVM services, and what would you weigh?
basics
~20 sSummary-mode NMT usually belongs on by default, after measuring its cost: it cannot be enabled mid-incident, and restarting to add it resets a slow leak. Keep detail mode for reproductions and watch RSS too, since NMT sees only JVM-owned memory.
As the lead for a fleet of JVM services in containers, what crash evidence do you make every JVM keep, and do you enable core dumps in production?
basics
~20 sAlways keep the hs_err log: -XX:ErrorFile with %p on a persistent volume, or ErrorFileToStdout into central logs. Core dumps are costly and hold memory contents, so enable them per service where native crashes recur, with storage, access and retention decided first.
For a fleet of latency-sensitive JDK 25 services, what policy would you set for diagnostic tooling that stops the world, such as scheduled thread dumps, class histograms and agents?
basics
~20 sMeasure each tool's stopped time from the safepoint log by operation name, then set rules by cost: frequent stops get cheaper alternatives or lower frequency, huge ones run only on instances out of rotation, and agents load at start-up.
showing 31–34 of 34