Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6508#discussion_r31385900
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala ---
    @@ -443,9 +466,27 @@ private[spark] class ExecutorAllocationManager(
       private def onExecutorIdle(executorId: String): Unit = synchronized {
         if (executorIds.contains(executorId)) {
           if (!removeTimes.contains(executorId) && 
!executorsPendingToRemove.contains(executorId)) {
    +
    +        val hasCachedBlocks =
    +          executorsWithCachedBlocks.contains(executorId) ||
    +            
executorEndpoints.get(executorId).exists(_.askWithRetry[Boolean](HasCachedBlocks))
    +
    +        if (hasCachedBlocks) executorsWithCachedBlocks += executorId
    --- End diff --
    
    By the way, this actually only saves as an RPC if we're caching blocks. If 
we're not caching anything, it will still be 1 RPC every time an executor is 
idle. If the latter turns out to be not a significant load on the driver after 
all, then maybe it makes sense to simplify the code by getting rid of this map.
    
    I can't tell whether it's totally worth it off the top of my head. It would 
be good to test this with many executors (order hundreds) to investigate 
whether it actually saves you much.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to