Skip to content

[GLUTEN-13833][CORE] Use executor resources for task off-heap budgets - #13834

Open
wecharyu wants to merge 1 commit into
apache:mainfrom
wecharyu:GLUTEN-13833
Open

wecharyu wants to merge 1 commit into
apache:mainfrom
wecharyu:GLUTEN-13833

Conversation

@wecharyu

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Fixes #13833.

When an AQE stage gets a custom ResourceProfile, Spark can launch its executor with the adjusted off-heap size while the task still receives the initial Gluten budgets through SQLConf. The driver's updateResourceSetting() can run after Spark has copied the session configuration into job local properties. As a result, Velox can receive a stale per-task budget, and Gluten memory isolation can still enforce the initial limit.

This PR computes both budgets on the executor using the effective SparkEnv.conf and TaskContext.cpus(). The native session configuration uses the resulting per-task budget, and the isolated memory target uses the conservative budget. The AQE rule continues to attach the profile to the RDD and no longer writes resource settings into the session SQLConf.

How was this patch tested?

Add new UT.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: OpenAI Codex (GPT-6)

@github-actions github-actions Bot added the CORE works for Gluten Core label Nov 28, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@wecharyu

Copy link
Copy Markdown
Contributor Author

@philo-he @zhztheplayer Could you help review this PR? Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[VL] Honor per-stage ResourceProfiles when computing task off-heap budgets

1 participant