skip to content

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 pageshow

explore

questions

page 2 of 2

What diagnostic evidence should every production JVM in your fleet record continuously, and what overhead budget would you accept for it?

level: principalimportance: should knowfreq 42%

basics

~20 s

Keep 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.

open as a page

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?

level: principalimportance: should knowfreq 30%

basics

~20 s

Summary-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.

open as a page

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?

level: principalimportance: nice to knowfreq 25%

basics

~20 s

Always 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.

open as a page

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?

level: principalimportance: nice to knowfreq 26%

basics

~20 s

Measure 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.

open as a page

showing 31–34 of 34