Uh oh!
There was an error while loading. Please reload this page.
[SPARK-26601][SQL] Make broadcast-exchange thread pool configurable - #23670
[SPARK-26601][SQL] Make broadcast-exchange thread pool configurable#23670caneGuy wants to merge 11 commits into
Conversation
SparkQA
commented
Jan 28, 2019
Test build #101752 has finished for PR 23670 at commit
|
@viirya@maropu@HyukjinKwon |
| .createWithDefault(1000) | ||
| val BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD = | ||
| buildStaticConf("spark.sql.broadcastExchange.maxThreadNumber") |
There was a problem hiding this comment.
spark.sql.broadcastExchange.maxThreadThreshold
| // for other test | ||
| SparkSession.getActiveSession.get.sparkContext.conf. | ||
| set(StaticSQLConf.BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD, previousNumber) | ||
| } |
There was a problem hiding this comment.
We need this test? In the other similar prs (e.g., https://github.com/apache/spark/pull/22847/files), we added no test. If necessary, we can add tests in ExecutorSideSQLConfSuite to check if executors can reference this static value...
SparkQA
commented
Jan 28, 2019
Test build #101755 has finished for PR 23670 at commit
|
dongjoon-hyun
commented
Feb 9, 2019
Hi, @caneGuy . |
caneGuy
commented
Feb 15, 2019
Thanks @dongjoon-hyun@maropu i remove the suite.since i think it's no need to test that. |
SparkQA
commented
Feb 15, 2019
Test build #102387 has finished for PR 23670 at commit
|
| val BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD = | ||
| buildStaticConf("spark.sql.broadcastExchange.maxThreadThreshold") | ||
| .doc("The maximum degree of parallelism to fetch and broadcast the table." + |
There was a problem hiding this comment.
nit: add a single space: ...table." ->...table. "
| buildStaticConf("spark.sql.broadcastExchange.maxThreadThreshold") | ||
| .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." + |
SparkQA
commented
Feb 18, 2019
Test build #102439 has finished for PR 23670 at commit
|
caneGuy
commented
Feb 21, 2019
Could you help retest this please? @maropu@dongjoon-hyun |
SparkQA
commented
Feb 21, 2019
Test build #102573 has finished for PR 23670 at commit
|
caneGuy
commented
Mar 1, 2019
The failed unit tests is below which i think is not related with the pr @dongjoon-hyun@maropu |
viirya
commented
Mar 1, 2019
retest this please. |
SparkQA
commented
Mar 1, 2019
Test build #102908 has finished for PR 23670 at commit
|
caneGuy
commented
Mar 7, 2019
Sorry for bothering @viirya but the failed case i think is still not related with this pr. |
viirya
commented
Mar 7, 2019
retest this please. |
SparkQA
commented
Mar 7, 2019
Test build #103120 has finished for PR 23670 at commit
|
dilipbiswal
commented
Mar 7, 2019
retest this please |
SparkQA
commented
Mar 7, 2019
Test build #103129 has finished for PR 23670 at commit
|
caneGuy
commented
Mar 26, 2019
@dilipbiswal I have resolve the conflict,please help check this review,thanks |
SparkQA
commented
Mar 26, 2019
Test build #103973 has finished for PR 23670 at commit
|
SparkQA
commented
Apr 11, 2019
Test build #104495 has finished for PR 23670 at commit
|
caneGuy
commented
Apr 18, 2019
failed case is not caused by this case |
HyukjinKwon
commented
Apr 18, 2019
retest this please |
| "cause longer waiting for other broadcasting. Also, increasing parallelism may " + | ||
| "cause memory problem.") | ||
| .intConf | ||
| .checkValue(thres => thres > 0, "The threshold should be positive.") |
There was a problem hiding this comment.
If this number cannot be more than 128, let's add that condition.
There was a problem hiding this comment.
+1 for checking thres <= 128, too.
HyukjinKwon
commented
Apr 18, 2019
retest this please |
| "cause longer waiting for other broadcasting. Also, increasing parallelism may " + | ||
| "cause memory problem.") | ||
| .intConf | ||
| .checkValue(thres => thres > 0, "The threshold should be positive.") |
There was a problem hiding this comment.
Let's make it .internal() so that we can remove this away if there's anything wrong found with this configuration later.
There was a problem hiding this comment.
Yeah, I just want to comment like that. I also think this is advanced and should not be exposed to users in general. +1
HyukjinKwon
commented
Apr 18, 2019
LGTM otheriwse. @cloud-fan, I will get this in. Please let me know if you have other concerns. |
SparkQA
commented
Apr 18, 2019
Test build #104686 has finished for PR 23670 at commit
|
SparkQA
commented
Apr 18, 2019
Test build #104687 has finished for PR 23670 at commit
|
dongjoon-hyun
commented
Apr 22, 2019
Retest this please. |
SparkQA
commented
Apr 22, 2019
Test build #104787 has finished for PR 23670 at commit
|
HyukjinKwon
commented
Apr 22, 2019
ping @caneGuy |
caneGuy
commented
May 10, 2019
Sorry for late reply, i will fix today @HyukjinKwon |
caneGuy
commented
May 10, 2019
@HyukjinKwon refine!Thanks too much |
SparkQA
commented
May 10, 2019
Test build #105309 has finished for PR 23670 at commit
|
caneGuy
commented
May 11, 2019
@HyukjinKwon ping thanks! |
| "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.") |
There was a problem hiding this comment.
There is a maximum limit (128) for this config. The error message doesn't reflect that. Once an invalid value like 200 is set, it can't figure out what goes wrong with it, if not reading this code.
There was a problem hiding this comment.
Yea let's improve this one before getting this in
| .intConf | ||
| .createWithDefault(1000) | ||
| val BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD = |
There was a problem hiding this comment.
nit: BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD -> BROADCAST_EXCHANGE_MAX_THREAD_THRESHOLD
There was a problem hiding this comment.
oh sorry for this error,i have fixed that
| private[execution] val executionContext = ExecutionContext.fromExecutorService( | ||
| ThreadUtils.newDaemonCachedThreadPool("broadcast-exchange", 128)) | ||
| ThreadUtils.newDaemonCachedThreadPool("broadcast-exchange", | ||
| SQLConf.get.getConf(StaticSQLConf.BROADCAST_EXCHANGE_MAX_THREAD_THREASHOLD))) |
SparkQA
commented
May 12, 2019
Test build #105337 has finished for PR 23670 at commit
|
HyukjinKwon
commented
May 13, 2019
Merged to master. Related tests and build passed |
| object BroadcastExchangeExec { | ||
| private[execution] val executionContext = ExecutionContext.fromExecutorService( | ||
| ThreadUtils.newDaemonCachedThreadPool("broadcast-exchange", 128)) | ||
| ThreadUtils.newDaemonCachedThreadPool("broadcast-exchange", |
There was a problem hiding this comment.
nit: the previous indentation was correct.
SparkQA
commented
May 13, 2019
Test build #105351 has finished for PR 23670 at commit
|

What changes were proposed in this pull request?
Currently,thread number of broadcast-exchange thread pool is fixed and keepAliveSeconds is also fixed as 60s.
But some times, if the Thead object do not GC quickly it may caused server(driver) OOM. In such case,we need to make this thread pool configurable.
A case has described in https://issues.apache.org/jira/browse/SPARK-26601
How was this patch tested?
UT