You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yinan Li (JIRA)" <ji...@apache.org> on 2018/02/08 20:04:00 UTC

[jira] [Commented] (SPARK-23285) Allow spark.executor.cores to be fractional

    [ https://issues.apache.org/jira/browse/SPARK-23285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16357500#comment-16357500 ] 

Yinan Li commented on SPARK-23285:
----------------------------------

Given the complexity and significant impact of the changes proposed in [https://github.com/apache/spark/pull/20460] to the way Spark handles task scheduling, task parallelism, and dynamic resource allocation, etc., I'm thinking if we should instead introduce a K8s specific configuration property for specifying the executor cores that follows the Kubernetes [convention|https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu]. It seems Mesos fine-grained mode does this with {{spark.mesos.mesosExecutor.cores}}. We can have something like {{spark.kubernetes.executor.cores}} that is only used for specifying the CPU core request for the executor pods. Existing configuration properties {{spark.executor.cores}} and {{spark.task.cpus}} still play their roles in task parallelism, task scheduling, etc. That is, {{spark.kubernetes.executor.cores}} only determines the physical CPU cores available to an executor. An executor can still run multiple tasks simultaneously if {{spark.executor.cores}} is a multiple of {{spark.task.cpus}}. If not set, {{spark.kubernetes.executor.cores}} falls back to {{spark.executor.cores}}. WDYT? 

> Allow spark.executor.cores to be fractional
> -------------------------------------------
>
>                 Key: SPARK-23285
>                 URL: https://issues.apache.org/jira/browse/SPARK-23285
>             Project: Spark
>          Issue Type: Improvement
>          Components: Kubernetes, Scheduler, Spark Submit
>    Affects Versions: 2.4.0
>            Reporter: Anirudh Ramanathan
>            Priority: Minor
>
> There is a strong check for an integral number of cores per executor in [SparkSubmitArguments.scala#L270-L272|https://github.com/apache/spark/blob/3f4060c340d6bac412e8819c4388ccba226efcf3/core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala#L270-L272]. Given we're reusing that property in K8s, does it make sense to relax it?
>  
> K8s treats CPU as a "compressible resource" and can actually assign millicpus to individual containers. Also to be noted - spark.driver.cores has no such check in place.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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