Threads & CPU
Thread dumps, runaway CPU, locks and virtual threads.
- High CPU in a Java process: finding the thread and the code responsible
A step-by-step method to go from a busy Java process to the exact thread and stack frame burning CPU, using top -H, the nid in thread dumps, jcmd, Flight Recorder and the GC log.
- Reading Java thread dumps: jstack, jcmd Thread.print and what each line means
How to take thread dumps with jcmd, jstack or SIGQUIT, how to read thread states, lock lines and deadlock reports, and how to use a series of dumps to diagnose hangs and slow requests.
- Virtual threads in production: JEP 444, pinning and what to monitor
How virtual threads work on top of carrier threads, when they help and when they do not, pinning before and after JDK 24, why they should not be pooled, limiting concurrency with semaphores, and how to observe them with thread dumps and JFR.


