Interview Prep/Jenkins/Backups, HA, upgrades & performance

How do you diagnose a hung or slow controller?

AdvancedConceptBackups, HA, upgrades & performance
Answer
# thread dump from inside the container
jcmd $(pgrep -f jenkins.war) Thread.print > /tmp/threads.txt
# or in the UI: /threadDump
# GC behaviour
jstat -gcutil $(pgrep -f jenkins.war) 5s
# heap histogram
jcmd $(pgrep -f jenkins.war) GC.class_histogram | head -30

Look for many threads blocked on the same lock, Executor threads stuck in SCM calls, long GC pauses. The Support Core plugin bundles thread dumps, logs, config and metrics in one zip for analysis. Also check disk latency (iostat -x) on the JENKINS_HOME volume.

All Jenkins questions Roadmap: Jenkins

More on Backups, HA, upgrades & performance