You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "jzhuge (via GitHub)" <gi...@apache.org> on 2026/04/04 00:07:37 UTC

[PR] [SPARK-56157][CORE] Support limitActiveProcessorCount in standalone mode [spark]

jzhuge opened a new pull request, #55190:
URL: https://github.com/apache/spark/pull/55190

   ### What changes were proposed in this pull request?
   
   Extend `spark.executor.limitActiveProcessorCount.enabled` and `spark.driver.limitActiveProcessorCount.enabled` to standalone cluster mode. Previously these flags only worked in YARN mode (SPARK-53209).
   
   - `ExecutorRunner`: injects `-XX:ActiveProcessorCount=<cores>` into executor JVM options when `spark.executor.limitActiveProcessorCount.enabled` is true
   - `DriverRunner`: injects `-XX:ActiveProcessorCount=<driverDesc.cores>` into driver JVM options when `spark.driver.limitActiveProcessorCount.enabled` is true
   - The flag is prepended before existing JVM options
   - Config descriptions updated to reflect standalone mode support
   
   ### Why are the changes needed?
   
   `spark.executor.limitActiveProcessorCount.enabled` and `spark.driver.limitActiveProcessorCount.enabled` had no effect in standalone cluster mode. Users on multi-core machines couldn't limit CPU with the same mechanism available in YARN.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. In standalone cluster mode:
   - `spark.executor.limitActiveProcessorCount.enabled=true` now injects `-XX:ActiveProcessorCount=<spark.executor.cores>` into executor JVM options
   - `spark.driver.limitActiveProcessorCount.enabled=true` now injects `-XX:ActiveProcessorCount=<spark.driver.cores>` into driver JVM options
   
   ### How was this patch tested?
   
   Added tests in `CommandUtilsSuite` covering both `ExecutorRunner` and `DriverRunner`:
   - Flag disabled by default
   - Flag enabled with correct core count
   - Correct value with custom core count
   - Flag prepended before existing JVM options
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 4.6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56157][CORE] Support limitActiveProcessorCount in standalone mode [spark]

Posted by "jzhuge (via GitHub)" <gi...@apache.org>.
jzhuge commented on PR #55190:
URL: https://github.com/apache/spark/pull/55190#issuecomment-4188298036

   @pan3793 @holdenk @mridulm @HyukjinKwon As a follow up to #51948, this is ready to go.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56157][CORE] Support limitActiveProcessorCount in standalone mode [spark]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #55190:
URL: https://github.com/apache/spark/pull/55190#issuecomment-5223499173

   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56157][CORE] Support limitActiveProcessorCount in standalone mode [spark]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #55190: [SPARK-56157][CORE] Support limitActiveProcessorCount in standalone mode
URL: https://github.com/apache/spark/pull/55190


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org