-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26601][SQL] Make broadcast-exchange thread pool configurable #23670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
0cd3149
cc9faa6
23ae9a0
ba19ccc
2117ee2
27b0ec4
8da84e3
a4523e9
46f454f
a10dac3
40c3592
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -132,6 +132,19 @@ object StaticSQLConf { | |
| .intConf | ||
| .createWithDefault(1000) | ||
|
|
||
| val BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD = | ||
| buildStaticConf("spark.sql.broadcastExchange.maxThreadThreshold") | ||
| .internal() | ||
| .doc("The maximum degree of parallelism to fetch and broadcast the table. " + | ||
| "If we encounter memory issue like frequently full GC or OOM when broadcast table " + | ||
| "we can decrease this number in order to reduce memory usage. " + | ||
| "Notice the number should be carefully chosen since decreasing parallelism might " + | ||
| "cause longer waiting for other broadcasting. Also, increasing parallelism may " + | ||
| "cause memory problem.") | ||
| .intConf | ||
| .checkValue(thres => thres > 0 && thres <= 128, "The threshold should be positive.") | ||
|
||
| .createWithDefault(128) | ||
|
|
||
| val SQL_EVENT_TRUNCATE_LENGTH = buildStaticConf("spark.sql.event.truncate.length") | ||
| .doc("Threshold of SQL length beyond which it will be truncated before adding to " + | ||
| "event. Defaults to no truncation. If set to 0, callsite will be logged instead.") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ import org.apache.spark.sql.catalyst.plans.physical.{BroadcastMode, BroadcastPar | |
| import org.apache.spark.sql.execution.{SparkPlan, SQLExecution} | ||
| import org.apache.spark.sql.execution.joins.HashedRelation | ||
| import org.apache.spark.sql.execution.metric.SQLMetrics | ||
| import org.apache.spark.sql.internal.SQLConf | ||
| import org.apache.spark.sql.internal.{SQLConf, StaticSQLConf} | ||
| import org.apache.spark.util.{SparkFatalException, ThreadUtils} | ||
|
|
||
| /** | ||
|
|
@@ -157,5 +157,6 @@ case class BroadcastExchangeExec( | |
|
|
||
| object BroadcastExchangeExec { | ||
| private[execution] val executionContext = ExecutionContext.fromExecutorService( | ||
| ThreadUtils.newDaemonCachedThreadPool("broadcast-exchange", 128)) | ||
| ThreadUtils.newDaemonCachedThreadPool("broadcast-exchange", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: the previous indentation was correct. |
||
| SQLConf.get.getConf(StaticSQLConf.BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD))) | ||
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD->BROADCAST_EXCHANGE_MAX_THREAD_THRESHOLDThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh sorry for this error,i have fixed that