GitHub user witgo opened a pull request:

    https://github.com/apache/spark/pull/17139

    [WIP][SPARK-18890][CORE](try 3) Move task serialization from the 
TaskSetManager to the CoarseGrainedSchedulerBackend

    ## What changes were proposed in this pull request?
    
    See https://issues.apache.org/jira/browse/SPARK-18890
    
    In the case of stage has a lot of tasks, this PR can improve the scheduling 
performance of ~~15%~~
    
    The test code:
    
    ``` scala
    
    val rdd = sc.parallelize(0 until 100).repartition(100000)
    rdd.localCheckpoint().count()
    rdd.sum()
    (1 to 10).foreach{ i=>
      val serializeStart = System.currentTimeMillis()
      rdd.sum()
      val serializeFinish = System.currentTimeMillis()
      println(f"Test $i: ${(serializeFinish - serializeStart) / 1000D}%1.2f")
    }
    
    ```
    
    and `spark-defaults.conf` file:
    
    ```
    spark.master                                      yarn-client
    spark.executor.instances                          20
    spark.driver.memory                               64g
    spark.executor.memory                             30g
    spark.executor.cores                              5
    spark.default.parallelism                         100 
    spark.sql.shuffle.partitions                      100
    spark.serializer                                  
org.apache.spark.serializer.KryoSerializer
    spark.driver.maxResultSize                        0
    spark.ui.enabled                                  false 
    spark.driver.extraJavaOptions                     -XX:+UseG1GC 
-XX:+UseStringDeduplication -XX:G1HeapRegionSize=16M -XX:MetaspaceSize=512M 
    spark.executor.extraJavaOptions                   -XX:+UseG1GC 
-XX:+UseStringDeduplication -XX:G1HeapRegionSize=16M -XX:MetaspaceSize=256M 
    spark.cleaner.referenceTracking.blocking          true
    spark.cleaner.referenceTracking.blocking.shuffle  true
    
    ```
    
    The test results are as follows
    
    **The table is out of date, to be updated**
    
    | [SPARK-17931](https://github.com/witgo/spark/tree/SPARK-17931) | 
[941b3f9](https://github.com/apache/spark/commit/941b3f9aca59e62c078508a934f8c2221ced96ce)
 |
    | --- | --- |
    | 17.116 s | 21.764 s |
    ## How was this patch tested?
    
    Existing tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/witgo/spark SPARK-18890-multi-threading

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/17139.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #17139
    
----
commit bfa285b1bd677e0c0b8a57ceda4433bb8ae072e9
Author: Guoqiang Li <wi...@qq.com>
Date:   2017-03-02T14:50:54Z

    Move task serialization from the TaskSetManager to the 
CoarseGrainedSchedulerBackend

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to