You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/11 01:03:34 UTC

[GitHub] [spark] zjf2012 commented on a change in pull request #23560: [SPARK-26632][Core] Separate Thread Configurations of Driver and Executor

zjf2012 commented on a change in pull request #23560: [SPARK-26632][Core] Separate Thread Configurations of Driver and Executor
URL: https://github.com/apache/spark/pull/23560#discussion_r264069852
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/network/netty/SparkTransportConf.scala
 ##########
 @@ -39,13 +39,18 @@ object SparkTransportConf {
    */
   def fromSparkConf(_conf: SparkConf, module: String, numUsableCores: Int = 0): TransportConf = {
     val conf = _conf.clone
-
-    // Specify thread configuration based on our JVM's allocation of cores (rather than necessarily
-    // assuming we have all the machine's cores).
-    // NB: Only set if serverThreads/clientThreads not already set.
+    val executorId = conf.get("spark.executor.id", "")
+    val isDriver = executorId == SparkContext.DRIVER_IDENTIFIER ||
+          executorId == SparkContext.LEGACY_DRIVER_IDENTIFIER
+    val role = if (isDriver) "driver" else "executor"
 
 Review comment:
   @vanzin , The configuration is read not only from "role", but also "module" in this enhancement. If there is no configurations for "role", it will fallback to "module". For ExternalShuffleService, we can just ignore "role" and use "module" of "shuffle", such as, spark.shuffle.*.  This enhancement weighs on the bottleneck of driver when they are too many RPC messages due to large number of small tasks. 
   Of course, we can have more "roles" if there are areas can be performance improved.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org