Checkpoint Lab — Performance Engineering: Executors, Queueing, Heap, Garbage Collection, Disk I/O, Workspaces, and Controller Load
Prove or reject one Jenkins performance hypothesis with a repeatable workload, matched evidence, one controlled change, and an explicit report of both latency and resource consequences.
Learning objectives
- Produce a reproducible baseline with controller/job/source/agent identity.
- Measure queue, executor, JVM, disk/workspace, Pipeline and external-latency evidence.
- Predict at least two state/resource changes before tuning.
- Change exactly one performance variable and rerun the same workload.
- Report whether end-to-end latency and resource use improved, regressed or merely shifted.
- Preserve a safe evidence packet and roll back the lab cleanly.
1. Mission
You are given the disposable
jenkins-perf-lab controller and the bounded workload
from Lesson 2. Your goal is not to make the best
benchmark number. Your goal is to demonstrate a defensible
performance-engineering method.
The checkpoint is complete only when another engineer can reproduce your baseline, understand your bottleneck hypothesis, identify the one variable you changed, and verify from evidence whether that change improved the intended service objective.
2. Safety and experiment rules
- Use only the disposable local controller/agent and synthetic repository/data.
- Keep the built-in/controller node at 0 executors.
- Use at most four concurrently triggered builds, two agent executors and two Pipeline branches.
- No production SCM, artifact repository, cloud, Kubernetes, IdP or secret is required.
- Do not disable Jenkins security controls.
- Do not create unbounded logs, files, threads, loops or parallel branches.
- Do not delete evidence before the comparison report is complete.
- Thread/heap/support diagnostics, if used, remain restricted and are not placed in the public evidence packet.
3. Record controller, job, source and execution identity
| Identity | Record |
|---|---|
| Controller | URL/instance name, Jenkins 2.568.3, Java runtime, UTC start. |
| Plugins | Metrics/Prometheus versions if used; Pipeline plugin versions relevant to the run. |
| Job |
Full name perf-lab/bounded-workload and exact
job configuration owner/source.
|
| Source | Jenkinsfile/source commit SHA or immutable training revision. |
| Agent |
perf-agent-01, labels, executor count,
OS/arch/Java, base image if containerized.
|
| Workspace | Exact workspace path recorded from the build; do not assume it. |
| Toolchain | Shell/Python/build tools used by the synthetic workload. |
| External dependency | Explicitly local/mock only, including configured delay if any. |
4. Write predictions before changing anything
Required prediction format:
Prediction A (baseline state)
If four identical builds arrive while perf-agent-01 has one executor,
then at least three queue items should wait initially, and queue reasons should
identify eligible-capacity pressure rather than controller failure.
Prediction B (candidate change)
If the measured bottleneck is eligible execution capacity AND agent/controller
resource headroom exists, adding exactly one executor or one disposable agent
should reduce queue wait. Per-build duration and controller load should remain
within the baseline confidence range. If they worsen materially, reject the change.
You may choose a different bottleneck and prediction, but it must be based on evidence and include a falsification condition.
5. Run the baseline workload
- Ensure the lab starts from the documented baseline: one eligible agent executor, serial workload mode, same source revision and cache state.
- Trigger exactly four builds.
- Capture queue snapshots through queue-to-build transitions.
- Capture node/executor snapshots and optional metrics.
- Record build start/end, stage timing, workspace size, console/artifact sizes and external mock latency.
- Repeat the baseline at least twice if practical so one anomalous run does not define the conclusion.
6. Baseline evidence packet
| Evidence group | Required fields |
|---|---|
| Controller/JVM | CPU or load evidence available to lab, heap/GC observations, relevant thread count/health, controller disk use/latency where available. |
| Queue | queue item IDs, enqueue time, reason, build allocation/start time, calculated wait. |
| Executors/agents | eligible node, executor count, busy/idle observations, online state, labels. |
| Build/Pipeline | build numbers/URLs/results, stage/step durations, Pipeline mode/branch count. |
| Workspace/storage | workspace path and size, largest generated files/cache class, artifact/report/log bytes. |
| External | mock dependency latency/status or explicit “none”. |
| Identity | source SHA, Jenkinsfile/library refs, plugin/tool/runtime versions. |
| Security | confirmation that no credential/secret or sensitive dump is in shareable evidence. |
7. State one bottleneck hypothesis
Your hypothesis must quote measurements. Examples:
Example 1 — eligible capacity
p95 queue wait = 145 s; perf-agent-01 single executor is continuously busy;
agent CPU peaks 45%, disk latency stays low, controller CPU/GC normal.
Hypothesis: eligible executor capacity is the dominant bottleneck.
Example 2 — agent I/O
queue wait < 5 s; build execution = 190 s; workspace write latency and iowait
rise during perf-data generation; controller CPU/GC normal.
Hypothesis: agent workspace storage is the dominant bottleneck.
Example 3 — controller/Pipeline
queue wait low; agent work < 20 s; controller CPU and Pipeline step persistence
spike during thousands of tiny steps; build completion waits on orchestration.
Hypothesis: Pipeline/controller orchestration is the dominant bottleneck.
8. Change exactly one variable
| Hypothesis | Allowed checkpoint change |
|---|---|
| Eligible capacity | Increase the disposable agent from 1 to 2 executors or add one equally configured disposable agent—not both. |
| Agent I/O | Move only the disposable workspace/data path to a faster local lab filesystem or reduce one bounded I/O source. |
| Console/evidence volume | Reduce synthetic console verbosity while preserving the same detailed file evidence. |
| Pipeline/CPS overhead | Replace one controller-side Groovy computation with one agent-side script while keeping functional result identical. |
| Controller heap genuinely undersized | Apply one modest JVM heap change only after proving host headroom/live-set need; document restart and rollback. |
| External mock latency | Change one local dependency/cache/timeout behavior; do not add Jenkins concurrency. |
Do not alter source revision, tool versions, agent image, cache state and executor count simultaneously. If multiple conditions must change, this checkpoint cannot attribute causality.
9. Rerun the identical workload
Trigger the same number of builds with the same job/source/parameters and collect the same evidence fields. Record the exact change timestamp so the before/after sets cannot be mixed.
10. Compare outcome and resource cost
| Metric | Before | After | Direction | Interpretation |
|---|---|---|---|---|
| Median / p95 queue wait | fill | fill | better/same/worse | Was scheduling delay affected? |
| Median build duration | fill | fill | better/same/worse | Did execution time change? |
| Batch makespan / end-to-end | fill | fill | better/same/worse | Did user-visible throughput/latency improve? |
| Controller CPU/heap/GC | fill | fill | better/same/worse | Did the change shift work onto controller? |
| Agent CPU/memory/I/O | fill | fill | better/same/worse | Did concurrency create contention? |
| Workspace/log/artifact volume | fill | fill | better/same/worse | Did storage/retention cost change? |
| External/mock latency | fill | fill | better/same/worse | Was external behavior held constant? |
| Recovery/durability semantics | same/change | same/change | n/a | Did any tuning alter restart survivability? |
11. Accept, reject or classify as inconclusive
Use one of these outcomes:
- Accept: the intended SLI improved and resource/reliability costs remain within documented bounds.
- Reject: the intended metric did not improve, another important metric regressed, or the change introduced unacceptable reliability/security cost.
- Inconclusive: workload/cache/environment changed, measurements are too noisy, or the evidence does not isolate the variable. Rebuild the experiment rather than inventing a conclusion.
12. Required performance report
Performance checkpoint report
=============================
Controller/core/Java/plugins:
Job/source/Jenkinsfile revision:
Agent/image/tools/executors:
Baseline workload definition:
Baseline run IDs / queue IDs:
Baseline measurements:
Bottleneck hypothesis:
Competing hypothesis:
Single controlled change:
After-change run IDs / queue IDs:
After-change measurements:
End-to-end result:
Controller resource result:
Agent/storage result:
Durability/reliability impact:
Decision: ACCEPT / REJECT / INCONCLUSIVE
Rollback performed or retained change:
Known limitations:
Evidence paths / redaction review:
13. Verification checklist
- Exactly five chapter files aside, the lab modified no shared Academy/course resources.
- Controller built-in executors stayed at 0.
- At least two predicted state/resource changes were written before the tuning change.
- Baseline and post-change runs used the same source, toolchain and bounded workload.
- Queue wait was not confused with build duration.
- Controller and agent resource costs were both considered.
- Workspace/log/artifact volume and external latency were explicit.
- Only one tuning variable changed.
- First-failure/slow evidence was preserved before cleanup or retry.
- The final conclusion can be rejected by the recorded measurements if the hypothesis was wrong.
- No secret, token, private key, heap dump or sensitive support bundle is in shareable evidence.
14. Cleanup and rollback
If the experiment changed executor count, heap, Pipeline durability, workspace location or any other lab setting, either restore the documented baseline or explicitly record why the accepted change remains. Dispose of the controller/agent and remove only exact temporary paths.
set -euo pipefail
OUT='/tmp/jenkins-perf-lab-evidence'
case "$OUT" in
/tmp/jenkins-perf-lab-evidence) rm -rf -- "$OUT" ;;
*) echo 'refusing unexpected cleanup path' >&2; exit 70 ;;
esac
15. What Chapter 38 adds to a production Jenkins operating model
Chapter 37 established how to observe Jenkins. Chapter 38 converts that telemetry into controlled engineering decisions. You can now distinguish queue/eligibility from executor saturation, controller/JVM pressure from agent execution, CPS persistence from project computation, and local storage from external-service latency. More importantly, you can prove whether a change helped rather than relying on intuition.
Chapter 39 builds directly on this discipline for LTS, Java and plugin upgrades: performance baselines become part of compatibility testing, and rollback planning must preserve both correctness and service behavior.
Knowledge check
Answer before revealing the explanation.
1. What makes a performance checkpoint reproducible?
Exact controller/plugin/tool/source/agent identity, a bounded workload, the same measurements, and one controlled variable between comparable runs.
2. When should a result be called inconclusive?
When environment/workload/cache changed, measurements are too noisy, or the experiment cannot isolate the intended variable.
3. Why compare batch makespan as well as per-build duration?
A concurrency change may make individual jobs faster or slower while changing overall throughput/queueing differently.
4. What should happen if queue wait improves but controller GC/resource cost becomes unacceptable?
Reject or redesign the change; optimization must include platform reliability/resource objectives, not one metric.
5. How does this chapter prepare for upgrades?
It provides a measured performance baseline and comparison method that can be rerun before/after Jenkins, Java or plugin changes in Chapter 39.
Official references and version notes
Performance behavior depends on controller scale, workload shape, storage, plugins and runtime versions. Re-check current primary documentation before applying any tuning change to a real controller.
- Jenkins — Scaling Jenkins
- Jenkins — Hardware Recommendations
- Jenkins — Architecting for Scale
- Jenkins — Scaling Pipelines / durability
- Jenkins — Pipeline Best Practices
- Jenkins — Using agents
- Jenkins — Managing nodes
- Jenkins — Java Support Policy
- Metrics plugin
- Prometheus metrics plugin
- Pipeline: Groovy plugin
- Pipeline: Supporting APIs plugin
- Jenkins LTS changelog
- Jenkins Security Advisories
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this
address.