Appearance
Detector catalog / Speed
GC
GC pressure
Executors lose time to garbage collection instead of running tasks.
- Outcome
- Speed
- Scope
- Judged per stage
- Usual fix
- A Spark configuration change
- CI gate
- No budget flag: gate it with
--fail-on-introducedagainst a baseline
An example finding
Where you see it
Dashboard
The GC tag marks it in the action region of the dashboard, among the widgets that rank a fix. Every affected stage is flagged, not only the worst.How to read it in the findings guide.
Agent (MCP)
An assistant can read this entry with the list_detectors tool and its background with get_finding_documentation. The call and the response below come from a real run of the MCP server.
Call
{
"tool": "list_detectors",
"arguments": {
"type": "gc"
}
}Response
{
"count": 1,
"detectors": [
{
"type": "gc",
"name": "GC pressure",
"tag": "GC",
"tagSharedWith": [],
"family": "speed",
"pitch": "Executors lose time to garbage collection instead of running tasks.",
"region": "action",
"scope": "stage",
"fixEffort": "config",
"thresholdSummary": "GC above 10% (or below 5%) of executor run time",
"detectors": [
{
"detector": "gc",
"version": 1,
"thresholds": {
"warnPct100": 10,
"lowInfoPct100": 5,
"minRunTimeMs": 10000,
"lowInfoFloorPct": 0.005
}
}
],
"pages": {
"catalog": "docs/detectors/gc.html",
"guide": "docs/user-guide/understanding-findings.html#gc"
},
"tuning": {
"kind": "page",
"anchor": "#bottleneck-gc",
"path": "docs/tuning-reference/bottleneck-gc.html#bottleneck-gc"
},
"gate": null
}
]
}get_finding_documentation call
{
"tool": "get_finding_documentation",
"arguments": {
"type": "gc"
}
}Its response, with each Markdown body replaced by its length
{
"type": "gc",
"name": "GC Pressure",
"detectionDoc": {
"tag": "GC",
"title": "Garbage collection pressure",
"content": "<703 characters of Markdown>"
},
"tuningDoc": {
"anchor": "#bottleneck-gc",
"title": "GC Pressure",
"content": "<6997 characters of Markdown>"
}
}CI (CLI)
List this entry from the command line. The output below is a real run of the command. Budgets and exit codes are in the CI guide.
sparkforensics-analyze detectors --type gc --format md# Detectors (1)
## Speed
| Tag | Type | Scope | Fix | Gate | What it finds |
| --- | --- | --- | --- | --- | --- |
| GC | `gc` | stage | config | | Executors lose time to garbage collection instead of running tasks. |
Report only this finding type for a run with --type:
sparkforensics-analyze <event-log> --type gc --impact critical,warning,info It has no budget flag. Fail a build on a new one by comparing against a baseline with --fail-on-introduced.
Airflow
The operator has no budget parameter for it. Use fail_on_introduced with a baseline.
check_spark_job = SparkForensicsOperator(
task_id="check_spark_job",
log_source=...,
backend=SubprocessAnalyzeHook(),
baseline_log_source=...,
fail_on_introduced="critical",
)The operator works per run, and its summary counts findings per impact band. See the operator for its parameters.
How it is measured
Thresholds
GC above 10% (or below 5%) of executor run time.
gc version 1
| Threshold | Default |
|---|---|
warnPct100 | 10 |
lowInfoPct100 | 5 |
minRunTimeMs | 10000 |
lowInfoFloorPct | 0.005 |
Each rule's impact bands and fixed fallbacks are in the threshold tables.
Override a default per run with --thresholds; see Tuning detector thresholds.
Docs
- This finding has its own tuning page: Spark tuning reference.
- Findings guide: GC in Understanding findings.