Appearance
Detector catalog / Speed
PART
Partition sizing
Shuffle partitions are too large, too uneven or too few, so tasks spill or fail.
- 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 PART 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": "partitionSizing"
}
}Response
{
"count": 1,
"detectors": [
{
"type": "partitionSizing",
"name": "partition sizing",
"tag": "PART",
"tagSharedWith": [],
"family": "speed",
"pitch": "Shuffle partitions are too large, too uneven or too few, so tasks spill or fail.",
"region": "action",
"scope": "stage",
"fixEffort": "config",
"thresholdSummary": "a shuffle partition over 5× the median or over 5 GiB, or 1 GiB of shuffle on 7 tasks or fewer",
"detectors": [
{
"detector": "partitionSizing",
"version": 1,
"thresholds": {
"skewRatio": 5,
"skewFloorBytes": 268435456,
"singleKeyShare": 0.9,
"lowParTotalBytes": 1073741824,
"lowParMaxTasks": 7,
"maxPartBytes": 5368709120
}
}
],
"pages": {
"catalog": "docs/detectors/partitionSizing.html",
"guide": "docs/user-guide/understanding-findings.html#part"
},
"tuning": {
"kind": "section",
"anchor": "#bottleneck-partition-sizing",
"path": "docs/tuning-reference/bottleneck-shuffle.html#bottleneck-partition-sizing"
},
"gate": null
}
]
}get_finding_documentation call
{
"tool": "get_finding_documentation",
"arguments": {
"type": "partitionSizing"
}
}Its response, with each Markdown body replaced by its length
{
"type": "partitionSizing",
"name": "Partition Sizing",
"detectionDoc": {
"tag": "PART",
"title": "Partition sizing",
"content": "<732 characters of Markdown>"
},
"tuningDoc": {
"anchor": "#bottleneck-partition-sizing",
"title": "Shuffle I/O",
"content": "<11215 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 partitionSizing --format md# Detectors (1)
## Speed
| Tag | Type | Scope | Fix | Gate | What it finds |
| --- | --- | --- | --- | --- | --- |
| PART | `partitionSizing` | stage | config | | Shuffle partitions are too large, too uneven or too few, so tasks spill or fail. |
Report only this finding type for a run with --type:
sparkforensics-analyze <event-log> --type partitionSizing --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
A shuffle partition over 5× the median or over 5 GiB, or 1 GiB of shuffle on 7 tasks or fewer.
partitionSizing version 1
| Threshold | Default |
|---|---|
skewRatio | 5 |
skewFloorBytes | 268435456 |
singleKeyShare | 0.9 |
lowParTotalBytes | 1073741824 |
lowParMaxTasks | 7 |
maxPartBytes | 5368709120 |
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 is covered in a section of a tuning page: Spark tuning reference.
- Findings guide: PART in Understanding findings.