Interview Prep/Jenkins/Operations: scale, HA, upgrades & performance

The controller has 12 GB heap and still does full GCs every few minutes. What do you investigate?

AdvancedScenarioOperations: scale, HA, upgrades & performance
Answer

Situation read → Memory pressure from data volume or a leak.

What I'd do →

  1. GC logs and jstat -gcutil to confirm old-gen growth after GC.
  2. Heap histogram (jcmd <pid> GC.class_histogram) or a heap dump analysed with Eclipse MAT: look for WorkflowRun, FlowNode, huge Strings, a specific plugin's classes.
  3. Common causes: thousands of retained builds loaded in memory, pipelines with tens of thousands of steps (huge flow graphs), massive console logs, a leaking plugin.
  4. Fix: buildDiscarder, reduce step counts (fewer echo in loops), upgrade/remove the leaking plugin; only then add heap.

Why → More heap delays the problem; data volume and leaks are usually the root.

Interview tip → Mention that step count matters: each step creates flow nodes held in memory.

All Jenkins questions Roadmap: Jenkins

More on Operations: scale, HA, upgrades & performance