Ngone51 commented on a change in pull request #25047: [WIP][SPARK-27371][CORE]
Support GPU-aware resources scheduling in Standalone
URL: https://github.com/apache/spark/pull/25047#discussion_r307992436
##########
File path: core/src/main/scala/org/apache/spark/deploy/master/Master.scala
##########
@@ -683,8 +704,7 @@ private[deploy] class Master(
if (app.coresLeft >= coresPerExecutor) {
// Filter out workers that don't have enough resources to launch an
executor
val usableWorkers = workers.toArray.filter(_.state ==
WorkerState.ALIVE)
- .filter(worker => worker.memoryFree >= app.desc.memoryPerExecutorMB
&&
- worker.coresFree >= coresPerExecutor)
+ .filter(canLaunchExecutor(_, app.desc))
.sortBy(_.coresFree).reverse
val assignedCores = scheduleExecutorsOnWorkers(app, usableWorkers,
spreadOutApps)
Review comment:
`scheduleExecutorsOnWorkers()` currently has two modes: 1) one executor per
worker 2) multiple executors per worker. If we don't configured
`coresPerExecutor`, then, we use mode 1. In mode 1, only one executor can be
launched per worker and that executor grabs all cores on the worker. But, for
memory and resources, it still respects to memoryPerExecutor and
resourcesPerExecutor rather than requires all.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]