Uh oh!
There was an error while loading. Please reload this page.
[SPARK-26155] Optimizing the performance of LongToUnsafeRowMap - #23214
[SPARK-26155] Optimizing the performance of LongToUnsafeRowMap#23214LuciferYang wants to merge 2 commits into
Conversation
LuciferYang
commented
Dec 4, 2018
cc @JkSelf help to check this patch. |
LuciferYang
commented
Dec 4, 2018
cc @cloud-fan , help to review this patch? |
LuciferYang
commented
Dec 4, 2018
ping @viirya |
adrian-wang
commented
Dec 4, 2018
maybe add some detailed test result in description and explain the reason for this in code comment? |
JkSelf
commented
Dec 4, 2018
@LuciferYang the patch is fine in my test environment. |
LuciferYang
commented
Dec 4, 2018
@JkSelf thx~ |
LuciferYang
commented
Dec 4, 2018
@adrian-wang ok~ I will add some comments to explain the reason |
cloud-fan
commented
Dec 4, 2018
ok to test |
| private var numKeyLookups = 0L | ||
| private var numProbes = 0L | ||
| private var numKeyLookups = new LongAdder | ||
| private var numProbes = new LongAdder |
There was a problem hiding this comment.
I'm surprised. I think LongToUnsafeRowMap is used in a single thread environment and multi-thread contend should not be an issue here. Do you have any insights about how this fixes the perf issue?
There was a problem hiding this comment.
Initially, I thought these two variables in class scope will affect SIMD optimization of JIT(after java8), we try to add -XX: -UseSuperWord to executor java opts to vertify this view, but no affect with spark-2.1, although this patch can improve performance....
cloud-fan
commented
Dec 4, 2018
I might know the root cause: For broadcast hash join, we will copy the broadcasted hash relation to avoid multi-thread problem, via The metrics is per-task, so I think a better fix is to track the hash probe metrics per |
cloud-fan
commented
Dec 4, 2018
It's easy to track |
SparkQA
commented
Dec 4, 2018
Test build #99651 has finished for PR 23214 at commit
|
viirya
commented
Dec 4, 2018
Thanks for doing this. I think we are more close to the root cause. |
LuciferYang
commented
Dec 4, 2018
Was there no problems of data correctness in the past use unthread-safe Long type? |
cloud-fan
commented
Dec 4, 2018
I think there is a problem, but no one found out because it's only about metrics. |
LuciferYang
commented
Dec 4, 2018
On the other hand, if is only a |
LuciferYang
commented
Dec 10, 2018
As @cloud-fan said |
What changes were proposed in this pull request?
To slove @JkSelf report problem at SPARK-26155, use LongAdder instead of Long of
numKeyLookupsandnumProbesto reduce add operation times. @JkSelf test this patch in Intel performance testing environment and run TPCDS sqls after this patch with Spark-2.3 and master no longer slower than Spark-2.1.How was this patch tested?
N/A