You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xingbo Jiang (Jira)" <ji...@apache.org> on 2020/01/08 19:32:00 UTC

[jira] [Resolved] (SPARK-30417) SPARK-29976 calculation of slots wrong for Standalone Mode

     [ https://issues.apache.org/jira/browse/SPARK-30417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xingbo Jiang resolved SPARK-30417.
----------------------------------
    Fix Version/s: 3.0.0
         Assignee: Yuchen Huo
       Resolution: Fixed

Resolved by https://github.com/apache/spark/pull/27126

> 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
>            Assignee: Yuchen Huo
>            Priority: Major
>             Fix For: 3.0.0
>
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org