spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Berman (JIRA)" <>
Subject [jira] [Commented] (SPARK-23423) Application declines any offers when killed+active executors rich spark.dynamicAllocation.maxExecutors
Date Sun, 18 Feb 2018 16:57:03 GMT


Igor Berman commented on SPARK-23423:

[~skonto] today I haven't managed to run with dynamic allocation on, however attached details
for following situation:

one of executors failed while running without dyn.allocation. All parties seem like getting
all the updates: slave agent, master, and even framework, but not  MesosCoarseGrainedSchedulerBackend
even though TaskSchedulerImpl did get "Lost executor 15"

see [^no-dyn-allocation-failed-no-statusUpdate.txt]


I'll enable dyn.allocation tomorrow. Meanwhile, do you think the attached behavior might be


> Application declines any offers when killed+active executors rich spark.dynamicAllocation.maxExecutors
> ------------------------------------------------------------------------------------------------------
>                 Key: SPARK-23423
>                 URL:
>             Project: Spark
>          Issue Type: Bug
>          Components: Mesos, Spark Core
>    Affects Versions: 2.2.1
>            Reporter: Igor Berman
>            Priority: Major
>              Labels: Mesos, dynamic_allocation
>         Attachments: no-dyn-allocation-failed-no-statusUpdate.txt
> Hi
> Mesos Version:1.1.0
> I've noticed rather strange behavior of MesosCoarseGrainedSchedulerBackend when running
on Mesos with dynamic allocation on and limiting number of max executors by spark.dynamicAllocation.maxExecutors.
> Suppose we have long running driver that has cyclic pattern of resource consumption(with
some idle times in between), due to dyn.allocation it receives offers and then releases them
after current chunk of work processed.
> Since at [] the
backend compares numExecutors < executorLimit and 
> numExecutors is defined as and slaves holds all slaves
ever "met", i.e. both active and killed (see comment [] 
> On the other hand, number of taskIds should be updated due to statusUpdate, but suppose
this update is lost(actually I don't see logs of 'is now TASK_KILLED') so this number of executors
might be wrong
> I've created test that "reproduces" this behavior, not sure how good it is:
> {code:java}
> //MesosCoarseGrainedSchedulerBackendSuite
> test("max executors registered stops to accept offers when dynamic allocation enabled")
>   setBackend(Map(
>     "spark.dynamicAllocation.maxExecutors" -> "1",
>     "spark.dynamicAllocation.enabled" -> "true",
>     "spark.dynamicAllocation.testing" -> "true"))
>   backend.doRequestTotalExecutors(1)
>   val (mem, cpu) = (backend.executorMemory(sc), 4)
>   val offer1 = createOffer("o1", "s1", mem, cpu)
>   backend.resourceOffers(driver, List(offer1).asJava)
>   verifyTaskLaunched(driver, "o1")
>   backend.doKillExecutors(List("0"))
>   verify(driver, times(1)).killTask(createTaskId("0"))
>   val offer2 = createOffer("o2", "s2", mem, cpu)
>   backend.resourceOffers(driver, List(offer2).asJava)
>   verify(driver, times(1)).declineOffer(offer2.getId)
> }{code}
> Workaround: Don't set maxExecutors with dynamicAllocation on
> Please advice
> Igor
> marking you friends since you were last to touch this piece of code and probably can
advice something([~vanzin], [~skonto], [~susanxhuynh])

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message