Skip to content

[SPARK-19486][CORE](try 3) Investigate using multiple threads for task serialization - #17139

Closed
witgo wants to merge 2 commits into
apache:masterfrom
witgo:SPARK-18890-multi-threading
Closed

[SPARK-19486][CORE](try 3) Investigate using multiple threads for task serialization#17139
witgo wants to merge 2 commits into
apache:masterfrom
witgo:SPARK-18890-multi-threading

Conversation

@witgo

@witgowitgo commented Mar 2, 2017

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

See https://issues.apache.org/jira/browse/SPARK-19486

In the case of stage has a lot of tasks, this PR can improve the scheduling performance of 15%

The test code:

valrdd= sc.parallelize(0 until 100).repartition(100000)
rdd.localCheckpoint().count()
rdd.sum()
(1 to 10).foreach{ i=>valserializeStart=System.nanoTime()
rdd.sum()
valserializeFinish=System.nanoTime()
println(f"${(serializeFinish - serializeStart) /1E9}%1.4f")
}

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

partitionSPARK-18890db0ddce
1000.0273 s0.028 s
1K0.1234 s0.1321 s
10k0.6557 s0.9502 s
100K6.1541 s9.4179 s

How was this patch tested?

Existing tests.

@witgo
witgoforce-pushed the SPARK-18890-multi-threading branch 3 times, most recently from a06f8c8 to 6874d1eCompareMarch 2, 2017 15:58
@SparkQA

Copy link
Copy Markdown

Test build #73775 has finished for PR 17139 at commit a06f8c8.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class SerializeTask(task: TaskDescription) extends CoarseGrainedClusterMessage
  • class SerializeTaskEndpoint(override val rpcEnv: RpcEnv) extends RpcEndpoint with Logging

@SparkQA

Copy link
Copy Markdown

Test build #73776 has finished for PR 17139 at commit 6874d1e.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class SerializeTask(task: TaskDescription) extends CoarseGrainedClusterMessage
  • class SerializeTaskEndpoint(override val rpcEnv: RpcEnv) extends RpcEndpoint with Logging

@SparkQA

Copy link
Copy Markdown

Test build #73769 has finished for PR 17139 at commit bfa285b.

  • This patch fails from timeout after a configured wait of `250m`.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class SerializeTask(task: TaskDescription) extends CoarseGrainedClusterMessage
  • class SerializeTaskEndpoint(override val rpcEnv: RpcEnv) extends RpcEndpoint with Logging

@SparkQA

Copy link
Copy Markdown

Test build #73771 has finished for PR 17139 at commit af5fc9f.

  • This patch fails from timeout after a configured wait of `250m`.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class SerializeTask(task: TaskDescription) extends CoarseGrainedClusterMessage
  • class SerializeTaskEndpoint(override val rpcEnv: RpcEnv) extends RpcEndpoint with Logging

@witgo
witgoforce-pushed the SPARK-18890-multi-threading branch from 6874d1e to 4d9b666CompareMarch 3, 2017 14:25
@SparkQA

Copy link
Copy Markdown

Test build #73848 has finished for PR 17139 at commit 4d9b666.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class SerializeTask(task: TaskDescription) extends CoarseGrainedClusterMessage
  • class SerializeTaskEndpoint(override val rpcEnv: RpcEnv) extends RpcEndpoint with Logging

@witgowitgo changed the title [WIP][SPARK-18890][CORE](try 3) Move task serialization from the TaskSetManager to the CoarseGrainedSchedulerBackend[SPARK-18890][CORE](try 3) Move task serialization from the TaskSetManager to the CoarseGrainedSchedulerBackendMar 4, 2017
@witgo

witgo commented Mar 8, 2017

Copy link
Copy Markdown
ContributorAuthor

ping @kayousterhout@squito

@kayousterhout

Copy link
Copy Markdown
Contributor

Why is the time improvement so much larger here than in the other PR?

@witgo

witgo commented Mar 8, 2017

Copy link
Copy Markdown
ContributorAuthor

Added the multi-threaded code for serialization TaskDescription .

@kayousterhout

Copy link
Copy Markdown
Contributor

Can you also post the time differences for some smaller jobs (e.g., 100 tasks, 1000 tasks, 10K tasks) to get a sense of how this varies with size?

@witgo

witgo commented Mar 9, 2017

Copy link
Copy Markdown
ContributorAuthor

@kayousterhout The test report has been updated.

@witgo
witgoforce-pushed the SPARK-18890-multi-threading branch from 4d9b666 to 8fbe15cCompareMarch 9, 2017 15:05
@SparkQA

Copy link
Copy Markdown

Test build #74270 has finished for PR 17139 at commit 8fbe15c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@witgowitgo changed the title [SPARK-18890][CORE](try 3) Move task serialization from the TaskSetManager to the CoarseGrainedSchedulerBackend[SPARK-19486][CORE](try 3) Investigate using multiple threads for task serializationMar 18, 2017
@jiangxb1987

Copy link
Copy Markdown
Contributor

@witgo Are you still working on this?

@witgo

Copy link
Copy Markdown
ContributorAuthor

@jiangxb1987 ,Yes do you have any questions?

@jiangxb1987

Copy link
Copy Markdown
Contributor

Please bring this PR up to date, then maybe some guy can review this. :)

@srowen

Copy link
Copy Markdown
Member

This should probably just be closed

@srowensrowen mentioned this pull request Jun 25, 2017
@gatorsmile

Copy link
Copy Markdown
Member

We are closing it due to inactivity. please do reopen if you want to push it forward. Thanks!

zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
## What changes were proposed in this pull request?
This PR proposes to close stale PRs, mostly the same instances with apache#18017
I believe the author in apache#14807 removed his account.
Closesapache#7075Closesapache#8927Closesapache#9202Closesapache#9366Closesapache#10861Closesapache#11420Closesapache#12356Closesapache#13028Closesapache#13506Closesapache#14191Closesapache#14198Closesapache#14330Closesapache#14807Closesapache#15839Closesapache#16225Closesapache#16685Closesapache#16692Closesapache#16995Closesapache#17181Closesapache#17211Closesapache#17235Closesapache#17237Closesapache#17248Closesapache#17341Closesapache#17708Closesapache#17716Closesapache#17721Closesapache#17937
Added:
Closesapache#14739Closesapache#17139Closesapache#17445Closesapache#18042Closesapache#18359
Added:
Closesapache#16450Closesapache#16525Closesapache#17738
Added:
Closesapache#16458Closesapache#16508Closesapache#17714
Added:
Closesapache#17830Closesapache#14742
## How was this patch tested?
N/A
Author: hyukjinkwon <gurwls223@gmail.com>
Closesapache#18417 from HyukjinKwon/close-stale-pr.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@witgo@SparkQA@kayousterhout@jiangxb1987@srowen@gatorsmile