Skip to content

Account for PySpark memory in cluster resource requests - #2137

Merged
parthosa merged 4 commits into
devfrom
tools-2134
Sep 3, 2026
Merged

parthosa merged 4 commits into
devfrom
tools-2134

Conversation

@parthosa

@parthosa parthosa commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

When AutoTuner recommends a positive spark.executor.pyspark.memory, it now also recommends the setting Spark needs to include that memory in the executor resource request:

  • YARN: spark.yarn.isPython=true
  • Kubernetes: spark.kubernetes.resource.type=python

Only the setting for the detected cluster manager is emitted. Standalone, local, and unknown masters are unchanged.

The PySpark memory rebalance also checks that the accounting setting can be applied. If it is excluded or enforced to an incompatible value, the rebalance is skipped instead of producing a partially valid memory layout.

Fixes #2134.

Testing

  • mvn verify (836 tests passed; Scalastyle reported no errors or warnings)

Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
@github-actions github-actions Bot added the core_tools Scope the core module (scala) label Sep 3, 2026
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
Signed-off-by: Partho Sarthi <psarthi@nvidia.com>
@parthosa
parthosa merged commit fe4d54c into dev Sep 3, 2026
17 checks passed
@parthosa
parthosa deleted the tools-2134 branch September 3, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autotuner core_tools Scope the core module (scala)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Set spark.yarn.isPython when recommending PySpark memory for Spark Connect

3 participants