AngersZhuuuu commented on a change in pull request #28541: URL: https://github.com/apache/spark/pull/28541#discussion_r426984333
########## File path: core/src/main/scala/org/apache/spark/memory/ExecutionMemoryPool.scala ########## @@ -138,6 +140,11 @@ private[memory] class ExecutionMemoryPool( if (toGrant < numBytes && curMem + toGrant < minMemoryPerTask) { logInfo(s"TID $taskAttemptId waiting for at least 1/2N of $poolName pool to be free") lock.wait() + } else if (toGrant == 0 && memoryFree > 0) { Review comment: > I don't see why it's still required to wait for more memory here. If your executor memory is not sufficient to support so many tasks, either increase your executor memory or reduce the slots per executor. Sometimes required 0 then cause Task throw OOM, in this case always task is heavy, re-compute cost a lot. For normal Spark job, we can change config to increase memory or change slot, but for long running Spark such as Thrift server, we can't always restart it. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org