squito commented on a change in pull request #19194: [SPARK-20589] Allow limiting task concurrency per stage URL: https://github.com/apache/spark/pull/19194#discussion_r248838222
########## File path: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala ########## @@ -284,10 +285,20 @@ private[spark] class ExecutorAllocationManager( * and pending tasks, rounded up. */ private def maxNumExecutorsNeeded(): Int = { - val numRunningOrPendingTasks = listener.totalPendingTasks + listener.totalRunningTasks - math.ceil(numRunningOrPendingTasks * executorAllocationRatio / + logInfo("maxConcurrentTasks: " + maxConcurrentTasks) + logInfo("listener.totalPendingTasks: " + listener.totalPendingTasks) + logInfo("listener.totalRunningTasks: " + listener.totalRunningTasks) + logInfo("executorAllocationRatio: " + executorAllocationRatio) + logInfo("tasksPerExecutorForFullParallelism" + tasksPerExecutorForFullParallelism) + val numRunningOrPendingTasks = Math.min(listener.totalPendingTasks + listener.totalRunningTasks, + maxConcurrentTasks) + + // (numRunningOrPendingTasks + tasksPerExecutor - 1) / tasksPerExecutor + val x = math.ceil(numRunningOrPendingTasks * executorAllocationRatio / tasksPerExecutorForFullParallelism) .toInt + logInfo("maxNumExecutorsNeeded: " + x) Review comment: this gets called somewhat frequently, can they be logDebug? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org