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

Thomas Graves commented on SPARK-30417:
---------------------------------------

[~yuchen.huo] is this something you could work on?

> SPARK-29976 calculation of slots wrong for Standalone Mode
> ----------------------------------------------------------
>
>                 Key: SPARK-30417
>                 URL: https://issues.apache.org/jira/browse/SPARK-30417
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.0.0
>            Reporter: Thomas Graves
>            Priority: Major
>
> In SPARK-29976 we added a config to determine if we should allow speculation 
> when the number of tasks is less then the number of slots on a single 
> executor.  The problem is that for standalone mode (and  mesos coarse 
> grained) the EXECUTOR_CORES config is not set properly by default. In those 
> modes the number of executor cores is all the cores of the Worker.    The 
> default of EXECUTOR_CORES is 1.
> The calculation:
> {color:#000080}val {color}{color:#660e7a}speculationTasksLessEqToSlots 
> {color}= {color:#660e7a}numTasks {color}<= 
> ({color:#660e7a}conf{color}.get({color:#660e7a}EXECUTOR_CORES{color}) / 
> sched.{color:#660e7a}CPUS_PER_TASK{color})
> If someone set the cpus per task > 1 then this would end up being false even 
> if 1 task.  Note that the default case where cpus per task is 1 and executor 
> cores is 1 it works out ok but is only applied if 1 task vs number of slots 
> on the executor.
> Here we really don't know the number of executor cores for standalone mode or 
> mesos so I think a decent solution is to just use 1 in those cases and 
> document the difference.
> Something like 
> max({color:#660e7a}conf{color}.get({color:#660e7a}EXECUTOR_CORES{color}) / 
> sched.{color:#660e7a}CPUS_PER_TASK{color}, 1)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to